-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't haveI-suggestion-causes-errorIssue: The suggestions provided by this Lint cause an ICE/error when appliedIssue: The suggestions provided by this Lint cause an ICE/error when applied
Description
Summary
A regression was introduced between nightly-2022-10-24
and nightly-2022-10-25
such that uninlined_format_args
is no longer respecting rust-version
in Cargo.toml
.
Lint Name
uninlined_format_args
Reproducer
$ git clone [email protected]:tokio-rs/async-backtrace
$ cd async-backtrace
$ git checkout 4795725db8a84252d14cd70b0c5db7aa25860d5b
$ cargo +nightly-2022-10-24 clippy # SUCCESS
$ cargo +nightly-2022-10-25 clippy # ERROR
warning: variables can be used directly in the `format!` string
--> backtrace/src/frame.rs:292:24
|
292 | next = format!("{} ", prefix);
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
292 - next = format!("{} ", prefix);
292 + next = format!("{prefix} ");
|
warning: variables can be used directly in the `format!` string
--> backtrace/src/frame.rs:295:24
|
295 | next = format!("{}│ ", prefix);
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
295 - next = format!("{}│ ", prefix);
295 + next = format!("{prefix}│ ");
|
Version
$ rustc +nightly-2022-10-25 -vV
rustc 1.66.0-nightly (758f19645 2022-10-24)
binary: rustc
commit-hash: 758f19645b8ebce61ea52d1f6672fd057bc8dbee
commit-date: 2022-10-24
host: aarch64-apple-darwin
release: 1.66.0-nightly
LLVM version: 15.0.2
Additional Labels
@rustbot label +I-suggestion-causes-error
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't haveI-suggestion-causes-errorIssue: The suggestions provided by this Lint cause an ICE/error when appliedIssue: The suggestions provided by this Lint cause an ICE/error when applied