Skip to content

uninlined_format_args cannot be "allowed" in Cargo.toml #12161

Closed
@szabgab

Description

@szabgab

Summary

Given this code:

fn main() {
    let name = "Rust";
    let _x = 1;
    println!("Hello, {}!", name);
}

I turned on pedantic in Cargo.toml and then wanted to turn off (allow) the individual lints so I can fix them one-by-one.

I could turn off the no_effect_underscore_binding lint (and in a bigger application every other lint that was complaining), but not the uninlined_format_args:

[lints.clippy]
pedantic = "deny"
uninlined_format_args = "allow"
no_effect_underscore_binding = "allow"

When running on the command-line (with or without the section in Cargo.toml then everything is fine.

cargo clippy -- -Dclippy::pedantic -Aclippy::uninlined_format_args -Aclippy::no_effect_underscore_binding

Reproducer

No response

Version

cargo clippy --version
clippy 0.1.75 (82e1608 2023-12-21)


rustc -Vv
rustc 1.75.0 (82e1608df 2023-12-21)
binary: rustc
commit-hash: 82e1608dfa6e0b5569232559e3d385fea5a93112
commit-date: 2023-12-21
host: x86_64-unknown-linux-gnu
release: 1.75.0
LLVM version: 17.0.6


### Additional Labels

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions