RS.CLIPPY.LINT_GROUPS_PRIORITY

A lint group in `Cargo.toml` at the same priority as a lint

This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: lint_groups_priority. Copyright ©2025 The Rust Team. All rights reserved.

What it does

Checks for lint groups with the same priority as lints in the Cargo.toml[lints] table.

This lint will be removed once cargo#12918 is resolved.

Why is this bad?

The order of lints in the [lints] is ignored, to have a lint override a group the priority field needs to be used, otherwise the sort order is undefined.

Known problems

Does not check lints inherited using lints.workspace = true

Example

[lints.clippy]
pedantic = "warn"
similar_names = "allow"

Use instead:

[lints.clippy]
pedantic = { level = "warn", priority = -1 }
similar_names = "allow"