Open
Description
I’m using the following Cargo.toml
:
[package]
name = "testing"
version = "0.1.0"
edition = "2021"
[lints.clippy]
lint_groups_priority = "warn"
[lints.rust]
keyword_idents = "deny"
macro_use_extern_crate = "deny"
rust_2018_idioms = "deny"
single_use_lifetimes = "deny"
Running cargo clippy
produces two warnings here:
warning: lint group `keyword_idents` has the same priority (0) as a lint
--> Cargo.toml:10:1
|
10 | keyword_idents = "deny"
| ^^^^^^^^^^^^^^ ------ has an implicit priority of 0
11 | macro_use_extern_crate = "deny"
| ---------------------- has the same priority as this lint
|
= note: the order of the lints in the table is ignored by Cargo
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lint_groups_priority
= note: requested on the command line with `-W clippy::lint-groups-priority`
help: to have lints override the group set `keyword_idents` to a lower priority
|
10 | keyword_idents = { level = "deny", priority = -1 }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: lint group `rust_2018_idioms` has the same priority (0) as a lint
--> Cargo.toml:12:1
|
12 | rust_2018_idioms = "deny"
| ^^^^^^^^^^^^^^^^ ------ has an implicit priority of 0
13 | single_use_lifetimes = "deny"
| -------------------- has the same priority as this lint
|
= note: the order of the lints in the table is ignored by Cargo
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lint_groups_priority
help: to have lints override the group set `rust_2018_idioms` to a lower priority
|
12 | rust_2018_idioms = { level = "deny", priority = -1 }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
While making the proposed changes silences the warnings, these look like false positives. According to documentation, single_use_lifetimes
isn’t part of rust_2018_idioms
, and keyword_idents
isn’t a group at all.
Meta
rustc --version --verbose
:
rustc 1.81.0-nightly (d0227c6a1 2024-06-11)
binary: rustc
commit-hash: d0227c6a19c2d6e8dceb87c7a2776dc2b10d2a04
commit-date: 2024-06-11
host: x86_64-unknown-linux-gnu
release: 1.81.0-nightly
LLVM version: 18.1.7