Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for new Rust nightly warnings related to dead code #2951

Merged
merged 1 commit into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions crates/libs/bindgen/src/rdl/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(dead_code)]

use super::*;
mod fmt;
mod from_reader;
Expand Down
3 changes: 1 addition & 2 deletions crates/libs/bindgen/src/rust/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ pub struct Cfg {
pub types: std::collections::BTreeMap<&'static str, std::collections::BTreeSet<metadata::TypeDef>>,
pub core_types: std::collections::BTreeSet<metadata::Type>,
pub arches: std::collections::BTreeSet<&'static str>,
pub implement: bool,
}

impl Cfg {
Expand Down Expand Up @@ -47,7 +46,7 @@ pub fn type_def_cfg(writer: &Writer, row: metadata::TypeDef, generics: &[metadat
cfg
}
pub fn type_def_cfg_impl(writer: &Writer, def: metadata::TypeDef, generics: &[metadata::Type]) -> Cfg {
let mut cfg = Cfg { implement: true, ..Default::default() };
let mut cfg = Cfg::default();

fn combine(writer: &Writer, def: metadata::TypeDef, generics: &[metadata::Type], cfg: &mut Cfg) {
type_def_cfg_combine(writer, def, generics, cfg);
Expand Down
2 changes: 1 addition & 1 deletion crates/libs/bindgen/src/winmd/writer/tables.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(non_snake_case)]
#![allow(dead_code, non_snake_case)]

use super::*;

Expand Down
Loading