Skip to content

MSRV regression #9716

@jswrenn

Description

@jswrenn

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

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveI-suggestion-causes-errorIssue: The suggestions provided by this Lint cause an ICE/error when applied

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions