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 8
8
// in such tests, and the we're testing a scenario with no modification to the default settings.
9
9
10
10
fn main ( ) {
11
+ // additional context is provided only if the level is not explicitly set
11
12
let WrongCase = 1 ;
12
13
//~^ WARN [non_snake_case]
13
14
//~| 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)]`
14
22
}
Original file line number Diff line number Diff line change 1
1
warning: 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
3
3
|
4
4
LL | let WrongCase = 1;
5
5
| ^^^^^^^^^ help: convert the identifier to snake case: `wrong_case`
6
6
|
7
7
= note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default
8
8
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
10
23
You can’t perform that action at this time.
0 commit comments