Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSRV regression #9716

Closed
jswrenn opened this issue Oct 25, 2022 · 2 comments
Closed

MSRV regression #9716

jswrenn opened this issue Oct 25, 2022 · 2 comments
Labels
C-bug Category: Clippy is not doing the correct thing I-false-positive Issue: The lint was triggered on code it shouldn't have I-suggestion-causes-error Issue: The suggestions provided by this Lint cause an ICE/error when applied

Comments

@jswrenn
Copy link
Member

jswrenn commented Oct 25, 2022

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

@jswrenn jswrenn added C-bug Category: Clippy is not doing the correct thing I-false-positive Issue: The lint was triggered on code it shouldn't have labels Oct 25, 2022
@rustbot rustbot added the I-suggestion-causes-error Issue: The suggestions provided by this Lint cause an ICE/error when applied label Oct 25, 2022
@Alexendoo
Copy link
Member

Looks like it's correct here, the feature is older than you might think, it was added in 1.58 and the rust-version is set to 1.59

jswrenn added a commit to jswrenn/async-backtrace that referenced this issue Oct 25, 2022
@jswrenn
Copy link
Member Author

jswrenn commented Oct 25, 2022

Oops! Apologies for my off-by-one error. :-)

@jswrenn jswrenn closed this as completed Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing I-false-positive Issue: The lint was triggered on code it shouldn't have I-suggestion-causes-error Issue: The suggestions provided by this Lint cause an ICE/error when applied
Projects
None yet
Development

No branches or pull requests

3 participants