Skip to content

Commit d9cabe2

Browse files
fix(lint_groups_priority): add missing comma to suggestion text
1 parent c07baa4 commit d9cabe2

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

clippy_lints/src/cargo/lint_groups_priority.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ fn check_table(cx: &LateContext<'_>, table: &DeTable<'_>, known_groups: &FxHashS
9797
diag.span_suggestion_verbose(
9898
config_span,
9999
format!(
100-
"to have lints override the group set `{}` to a lower priority",
100+
"to have lints override the group, set `{}` to a lower priority",
101101
group.as_ref()
102102
),
103103
format!("{{ level = {:?}, priority = {low_priority} }}", group_config.level),

tests/ui-cargo/lint_groups_priority/fail/Cargo.stderr

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ error: lint group `rust_2018_idioms` has the same priority (0) as a lint
99
|
1010
= note: the order of the lints in the table is ignored by Cargo
1111
= note: `#[deny(clippy::lint_groups_priority)]` on by default
12-
help: to have lints override the group set `rust_2018_idioms` to a lower priority
12+
help: to have lints override the group, set `rust_2018_idioms` to a lower priority
1313
|
1414
7 - rust_2018_idioms = "warn"
1515
7 + rust_2018_idioms = { level = "warn", priority = -1 }
@@ -20,12 +20,12 @@ error: lint group `unused` has the same priority (0) as a lint
2020
|
2121
10 | unused = { level = "deny" }
2222
| ^^^^^^ ------------------ has an implicit priority of 0
23-
11 | unused_braces = { level = "allow", priority = 1 }
23+
11 | unused_braces = { level = "allow", p...
2424
12 | unused_attributes = { level = "allow" }
2525
| ----------------- has the same priority as this lint
2626
|
2727
= note: the order of the lints in the table is ignored by Cargo
28-
help: to have lints override the group set `unused` to a lower priority
28+
help: to have lints override the group, set `unused` to a lower priority
2929
|
3030
10 | unused = { level = "deny", priority = -1 }
3131
| +++++++++++++++
@@ -35,11 +35,11 @@ error: lint group `pedantic` has the same priority (-1) as a lint
3535
|
3636
15 | pedantic = { level = "warn", priority = -1 }
3737
| ^^^^^^^^
38-
16 | similar_names = { level = "allow", priority = -1 }
38+
16 | similar_names = { level = "allow", priority =...
3939
| ------------- has the same priority as this lint
4040
|
4141
= note: the order of the lints in the table is ignored by Cargo
42-
help: to have lints override the group set `pedantic` to a lower priority
42+
help: to have lints override the group, set `pedantic` to a lower priority
4343
|
4444
15 - pedantic = { level = "warn", priority = -1 }
4545
15 + pedantic = { level = "warn", priority = -2 }
@@ -54,7 +54,7 @@ error: lint group `rust_2018_idioms` has the same priority (0) as a lint
5454
| ------------------ has the same priority as this lint
5555
|
5656
= note: the order of the lints in the table is ignored by Cargo
57-
help: to have lints override the group set `rust_2018_idioms` to a lower priority
57+
help: to have lints override the group, set `rust_2018_idioms` to a lower priority
5858
|
5959
19 - rust_2018_idioms = "warn"
6060
19 + rust_2018_idioms = { level = "warn", priority = -1 }
@@ -69,7 +69,7 @@ error: lint group `pedantic` has the same priority (0) as a lint
6969
| ------------- has the same priority as this lint
7070
|
7171
= note: the order of the lints in the table is ignored by Cargo
72-
help: to have lints override the group set `pedantic` to a lower priority
72+
help: to have lints override the group, set `pedantic` to a lower priority
7373
|
7474
23 - pedantic = "warn"
7575
23 + pedantic = { level = "warn", priority = -1 }

0 commit comments

Comments
 (0)