Skip to content

Commit 9fc88bc

Browse files
committed
fix fallout from previous commit
1 parent 6bedaae commit 9fc88bc

File tree

232 files changed

+371
-369
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

232 files changed

+371
-369
lines changed

clippy_lints/src/approx_const.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl ApproxConstant {
9595
cx,
9696
APPROX_CONSTANT,
9797
e.span,
98-
&format!("approximate value of `{module}::consts::{}` found", &name),
98+
format!("approximate value of `{module}::consts::{}` found", &name),
9999
None,
100100
"consider using the constant directly",
101101
);

clippy_lints/src/asm_syntax.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ fn check_asm_syntax(
5353
cx,
5454
lint,
5555
span,
56-
&format!("{style} x86 assembly syntax used"),
56+
format!("{style} x86 assembly syntax used"),
5757
None,
58-
&format!("use {} x86 assembly syntax", !style),
58+
format!("use {} x86 assembly syntax", !style),
5959
);
6060
}
6161
}

clippy_lints/src/assertions_on_constants.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl<'tcx> LateLintPass<'tcx> for AssertionsOnConstants {
5858
cx,
5959
ASSERTIONS_ON_CONSTANTS,
6060
macro_call.span,
61-
&format!(
61+
format!(
6262
"`{}!(true)` will be optimized out by the compiler",
6363
cx.tcx.item_name(macro_call.def_id)
6464
),
@@ -74,9 +74,9 @@ impl<'tcx> LateLintPass<'tcx> for AssertionsOnConstants {
7474
cx,
7575
ASSERTIONS_ON_CONSTANTS,
7676
macro_call.span,
77-
&format!("`assert!(false{assert_arg})` should probably be replaced"),
77+
format!("`assert!(false{assert_arg})` should probably be replaced"),
7878
None,
79-
&format!("use `panic!({panic_arg})` or `unreachable!({panic_arg})`"),
79+
format!("use `panic!({panic_arg})` or `unreachable!({panic_arg})`"),
8080
);
8181
}
8282
}

clippy_lints/src/attrs/allow_attributes_without_reason.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub(super) fn check<'cx>(cx: &LateContext<'cx>, name: Symbol, items: &[NestedMet
3030
cx,
3131
ALLOW_ATTRIBUTES_WITHOUT_REASON,
3232
attr.span,
33-
&format!("`{}` attribute without specifying a reason", name.as_str()),
33+
format!("`{}` attribute without specifying a reason", name.as_str()),
3434
None,
3535
"try adding a reason at the end with `, reason = \"..\"`",
3636
);

clippy_lints/src/attrs/inline_always.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub(super) fn check(cx: &LateContext<'_>, span: Span, name: Symbol, attrs: &[Att
2121
cx,
2222
INLINE_ALWAYS,
2323
attr.span,
24-
&format!("you have declared `#[inline(always)]` on `{name}`. This is usually a bad idea"),
24+
format!("you have declared `#[inline(always)]` on `{name}`. This is usually a bad idea"),
2525
);
2626
}
2727
}

clippy_lints/src/attrs/maybe_misused_cfg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fn check_nested_misused_cfg(cx: &EarlyContext<'_>, items: &[NestedMetaItem]) {
4040
cx,
4141
MAYBE_MISUSED_CFG,
4242
meta.span,
43-
&format!("'test' may be misspelled as '{}'", ident.name.as_str()),
43+
format!("'test' may be misspelled as '{}'", ident.name.as_str()),
4444
"did you mean",
4545
"test".to_string(),
4646
Applicability::MaybeIncorrect,

clippy_lints/src/attrs/unnecessary_clippy_cfg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub(super) fn check(
5858
clippy_lints,
5959
"no need to put clippy lints behind a `clippy` cfg",
6060
None,
61-
&format!(
61+
format!(
6262
"write instead: `#{}[{}({})]`",
6363
if attr.style == AttrStyle::Inner { "!" } else { "" },
6464
ident.name,

clippy_lints/src/await_holding_invalid.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ fn emit_invalid_type(cx: &LateContext<'_>, span: Span, disallowed: &DisallowedPa
267267
cx,
268268
AWAIT_HOLDING_INVALID_TYPE,
269269
span,
270-
&format!(
270+
format!(
271271
"`{}` may not be held across an `await` point per `clippy.toml`",
272272
disallowed.path()
273273
),

clippy_lints/src/blocks_in_conditions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ impl<'tcx> LateLintPass<'tcx> for BlocksInConditions {
7272
else {
7373
return;
7474
};
75-
let complex_block_message = &format!(
75+
let complex_block_message = format!(
7676
"in {desc}, avoid complex blocks or closures with blocks; \
7777
instead, move the block or closure higher and bind it with a `let`",
7878
);
@@ -141,7 +141,7 @@ impl<'tcx> LateLintPass<'tcx> for BlocksInConditions {
141141
let ex = &body.value;
142142
if let ExprKind::Block(block, _) = ex.kind {
143143
if !body.value.span.from_expansion() && !block.stmts.is_empty() {
144-
span_lint(cx, BLOCKS_IN_CONDITIONS, ex.span, complex_block_message);
144+
span_lint(cx, BLOCKS_IN_CONDITIONS, ex.span, complex_block_message.clone());
145145
return ControlFlow::Continue(Descend::No);
146146
}
147147
}

clippy_lints/src/bool_assert_comparison.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ impl<'tcx> LateLintPass<'tcx> for BoolAssertComparison {
121121
cx,
122122
BOOL_ASSERT_COMPARISON,
123123
macro_call.span,
124-
&format!("used `{macro_name}!` with a literal bool"),
124+
format!("used `{macro_name}!` with a literal bool"),
125125
|diag| {
126126
// assert_eq!(...)
127127
// ^^^^^^^^^

0 commit comments

Comments
 (0)