File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 88// in such tests, and the we're testing a scenario with no modification to the default settings.
99
1010fn main ( ) {
11+ // additional context is provided only if the level is not explicitly set
1112 let WrongCase = 1 ;
1213 //~^ WARN [non_snake_case]
1314 //~| NOTE `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default
15+
16+ // unchanged message if the level is explicitly set
17+ // even if the level is the same as the default
18+ #[ warn( nonstandard_style) ] //~ NOTE the lint level is defined here
19+ let WrongCase = 2 ;
20+ //~^ WARN [non_snake_case]
21+ //~| NOTE `#[warn(non_snake_case)]` implied by `#[warn(nonstandard_style)]`
1422}
Original file line number Diff line number Diff line change 11warning: variable `WrongCase` should have a snake case name
2- --> $DIR/default-groups-issue-65464.rs:11 :9
2+ --> $DIR/default-groups-issue-65464.rs:12 :9
33 |
44LL | let WrongCase = 1;
55 | ^^^^^^^^^ help: convert the identifier to snake case: `wrong_case`
66 |
77 = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default
88
9- warning: 1 warning emitted
9+ warning: variable `WrongCase` should have a snake case name
10+ --> $DIR/default-groups-issue-65464.rs:19:9
11+ |
12+ LL | let WrongCase = 2;
13+ | ^^^^^^^^^ help: convert the identifier to snake case: `wrong_case`
14+ |
15+ note: the lint level is defined here
16+ --> $DIR/default-groups-issue-65464.rs:18:12
17+ |
18+ LL | #[warn(nonstandard_style)]
19+ | ^^^^^^^^^^^^^^^^^
20+ = note: `#[warn(non_snake_case)]` implied by `#[warn(nonstandard_style)]`
21+
22+ warning: 2 warnings emitted
1023
You can’t perform that action at this time.
0 commit comments