Enable a few more clippy lints.

This commit is contained in:
Dan Gohman
2018-07-26 10:10:36 -07:00
parent cc7ba7e69a
commit 15520fa961
4 changed files with 11 additions and 17 deletions

View File

@@ -631,7 +631,7 @@ def gen_member_inits(iform, fmt):
# Immediate operands.
# We have local variables with the same names as the members.
for f in iform.imm_fields:
fmt.line('{}: {},'.format(f.member, f.member))
fmt.line('{},'.format(f.member))
# Value operands.
if iform.has_value_list:

View File

@@ -5,8 +5,6 @@
#![cfg_attr(feature = "std", warn(unstable_features))]
#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
#![cfg_attr(feature="cargo-clippy", allow(
// Rustfmt 0.9.0 is at odds with this lint:
block_in_if_condition_stmt,
// Produces only a false positive:
while_let_loop,
// Produces many false positives, but did produce some valid lints, now fixed:
@@ -28,8 +26,6 @@
new_without_default,
new_without_default_derive,
should_implement_trait,
redundant_field_names,
useless_let_if_seq,
len_without_is_empty))]
#![cfg_attr(
feature = "cargo-clippy",

View File

@@ -188,13 +188,13 @@ fn optimize_complex_addresses(pos: &mut EncCursor, inst: Inst, isa: &TargetIsa)
flags,
offset,
} => MemOpInfo {
opcode: opcode,
inst: inst,
opcode,
inst,
itype: pos.func.dfg.ctrl_typevar(inst),
arg: arg,
arg,
st_arg: None,
flags: flags,
offset: offset,
flags,
offset,
add_args: None,
},
InstructionData::Store {
@@ -203,13 +203,13 @@ fn optimize_complex_addresses(pos: &mut EncCursor, inst: Inst, isa: &TargetIsa)
flags,
offset,
} => MemOpInfo {
opcode: opcode,
inst: inst,
opcode,
inst,
itype: pos.func.dfg.ctrl_typevar(inst),
arg: args[1],
st_arg: Some(args[0]),
flags: flags,
offset: offset,
flags,
offset,
add_args: None,
},
_ => return,

View File

@@ -6,9 +6,7 @@
#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)]
#![warn(unused_import_braces, unstable_features)]
#![cfg_attr(feature="cargo-clippy", allow(
type_complexity,
// Rustfmt 0.9.0 is at odds with this lint:
block_in_if_condition_stmt))]
type_complexity))]
#![cfg_attr(
feature = "cargo-clippy",
warn(