From d9cabe2bdfb28645ed0e2e3c1032ae6770ba1227 Mon Sep 17 00:00:00 2001 From: Shivangi Sharma Date: Sat, 4 Apr 2026 22:21:15 +0530 Subject: [PATCH] fix(lint_groups_priority): add missing comma to suggestion text --- clippy_lints/src/cargo/lint_groups_priority.rs | 2 +- .../lint_groups_priority/fail/Cargo.stderr | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/clippy_lints/src/cargo/lint_groups_priority.rs b/clippy_lints/src/cargo/lint_groups_priority.rs index fbf5f72c5361..2d72db053fed 100644 --- a/clippy_lints/src/cargo/lint_groups_priority.rs +++ b/clippy_lints/src/cargo/lint_groups_priority.rs @@ -97,7 +97,7 @@ fn check_table(cx: &LateContext<'_>, table: &DeTable<'_>, known_groups: &FxHashS diag.span_suggestion_verbose( config_span, format!( - "to have lints override the group set `{}` to a lower priority", + "to have lints override the group, set `{}` to a lower priority", group.as_ref() ), format!("{{ level = {:?}, priority = {low_priority} }}", group_config.level), diff --git a/tests/ui-cargo/lint_groups_priority/fail/Cargo.stderr b/tests/ui-cargo/lint_groups_priority/fail/Cargo.stderr index a87339a9a301..3dafcaa44095 100644 --- a/tests/ui-cargo/lint_groups_priority/fail/Cargo.stderr +++ b/tests/ui-cargo/lint_groups_priority/fail/Cargo.stderr @@ -9,7 +9,7 @@ error: lint group `rust_2018_idioms` has the same priority (0) as a lint | = note: the order of the lints in the table is ignored by Cargo = note: `#[deny(clippy::lint_groups_priority)]` on by default -help: to have lints override the group set `rust_2018_idioms` to a lower priority +help: to have lints override the group, set `rust_2018_idioms` to a lower priority | 7 - rust_2018_idioms = "warn" 7 + rust_2018_idioms = { level = "warn", priority = -1 } @@ -20,12 +20,12 @@ error: lint group `unused` has the same priority (0) as a lint | 10 | unused = { level = "deny" } | ^^^^^^ ------------------ has an implicit priority of 0 -11 | unused_braces = { level = "allow", priority = 1 } +11 | unused_braces = { level = "allow", p... 12 | unused_attributes = { level = "allow" } | ----------------- has the same priority as this lint | = note: the order of the lints in the table is ignored by Cargo -help: to have lints override the group set `unused` to a lower priority +help: to have lints override the group, set `unused` to a lower priority | 10 | unused = { level = "deny", priority = -1 } | +++++++++++++++ @@ -35,11 +35,11 @@ error: lint group `pedantic` has the same priority (-1) as a lint | 15 | pedantic = { level = "warn", priority = -1 } | ^^^^^^^^ -16 | similar_names = { level = "allow", priority = -1 } +16 | similar_names = { level = "allow", priority =... | ------------- has the same priority as this lint | = note: the order of the lints in the table is ignored by Cargo -help: to have lints override the group set `pedantic` to a lower priority +help: to have lints override the group, set `pedantic` to a lower priority | 15 - pedantic = { level = "warn", priority = -1 } 15 + pedantic = { level = "warn", priority = -2 } @@ -54,7 +54,7 @@ error: lint group `rust_2018_idioms` has the same priority (0) as a lint | ------------------ has the same priority as this lint | = note: the order of the lints in the table is ignored by Cargo -help: to have lints override the group set `rust_2018_idioms` to a lower priority +help: to have lints override the group, set `rust_2018_idioms` to a lower priority | 19 - rust_2018_idioms = "warn" 19 + rust_2018_idioms = { level = "warn", priority = -1 } @@ -69,7 +69,7 @@ error: lint group `pedantic` has the same priority (0) as a lint | ------------- has the same priority as this lint | = note: the order of the lints in the table is ignored by Cargo -help: to have lints override the group set `pedantic` to a lower priority +help: to have lints override the group, set `pedantic` to a lower priority | 23 - pedantic = "warn" 23 + pedantic = { level = "warn", priority = -1 }