Skip to content
Snippets Groups Projects
Verified Commit 51b1529a authored by Vincent Lafeychine's avatar Vincent Lafeychine
Browse files

clippy: Fix match_single_binding

parent 3dbd870f
No related branches found
No related tags found
1 merge request!33Fix most of clippy::complexity and clippy::correctness
......@@ -21,7 +21,6 @@ rustflags = [
"-Aunused_variables",
# clippy::complexity
"-Aclippy::match_single_binding",
"-Aclippy::needless_borrowed_reference",
"-Aclippy::needless_lifetimes",
"-Aclippy::only_used_in_recursion",
......
......@@ -180,22 +180,18 @@ fn main() {
// Very first arg: binary name.
rustc_args.push(arg);
} else {
match arg.as_str() {
_ => {
// Disable incremental compilation because it causes mir_borrowck not to be called.
if arg == "--codegen" || arg == "-C" {
is_codegen = true;
} else if is_codegen && arg.starts_with("incremental=") {
// Just drop the argument.
is_codegen = false;
} else {
if is_codegen {
rustc_args.push("-C".to_owned());
is_codegen = false;
}
rustc_args.push(arg);
}
},
// Disable incremental compilation because it causes mir_borrowck not to be called.
if arg == "--codegen" || arg == "-C" {
is_codegen = true;
} else if is_codegen && arg.starts_with("incremental=") {
// Just drop the argument.
is_codegen = false;
} else {
if is_codegen {
rustc_args.push("-C".to_owned());
is_codegen = false;
}
rustc_args.push(arg);
}
}
}
......
......@@ -3123,12 +3123,10 @@ impl<'a, 'def: 'a, 'tcx: 'def> BodyTranslator<'a, 'def, 'tcx> {
})
},
Rvalue::NullaryOp(op, _ty) => {
match op {
_ => Err(TranslationError::UnsupportedFeature {
description: "nullary ops (AlignOf, Sizeof) are not supported currently".to_string(),
}),
}
// TODO: SizeOf
Err(TranslationError::UnsupportedFeature {
description: "nullary ops (AlignOf, Sizeof) are not supported currently".to_string(),
})
},
Rvalue::Discriminant(pl) => {
let ty = self.get_type_of_place(pl)?;
......
......@@ -692,11 +692,7 @@ where
let meta: &[specs::LiteralTyParam] = builder.get_ty_params();
let _meta: ParseMeta = (&meta, &lfts);
match seg.ident.name.as_str() {
_ => {
info!("ignoring function attribute: {:?}", args);
},
}
info!("ignoring function attribute: {:?}", args);
}
},
Err(e) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment