clippy::useless_format
This commit is contained in:
@@ -255,7 +255,7 @@ impl NonConstOp for CellBorrow {
|
||||
);
|
||||
err.span_label(
|
||||
span,
|
||||
format!("this borrow of an interior mutable value may end up in the final value"),
|
||||
"this borrow of an interior mutable value may end up in the final value",
|
||||
);
|
||||
if let hir::ConstContext::Static(_) = ccx.const_kind() {
|
||||
err.help(
|
||||
|
||||
@@ -344,7 +344,7 @@ impl DebugCounters {
|
||||
return if counter_format.id {
|
||||
format!("{}#{}", block_label, id.index())
|
||||
} else {
|
||||
format!("{}", block_label)
|
||||
block_label.to_string()
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -369,7 +369,7 @@ impl DebugCounters {
|
||||
}
|
||||
return format!("({})", self.format_counter_kind(counter_kind));
|
||||
}
|
||||
return format!("{}", self.format_counter_kind(counter_kind));
|
||||
return self.format_counter_kind(counter_kind).to_string();
|
||||
}
|
||||
}
|
||||
format!("#{}", operand.index().to_string())
|
||||
|
||||
@@ -147,8 +147,8 @@ fn validate_simd_shuffle(tcx: TyCtxt<'tcx>, args: &[Operand<'tcx>], span: Span)
|
||||
match &args[2] {
|
||||
Operand::Constant(_) => {} // all good
|
||||
_ => {
|
||||
let msg = format!("last argument of `simd_shuffle` is required to be a `const` item");
|
||||
tcx.sess.span_err(span, &msg);
|
||||
let msg = "last argument of `simd_shuffle` is required to be a `const` item";
|
||||
tcx.sess.span_err(span, msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user