Skip to content

Commit 8588f8f

Browse files
committed
add test
1 parent e5b1a99 commit 8588f8f

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//@ check-pass
2+
3+
// Verify information about membership to builtin lint group is included in the lint message when
4+
// explaining lint level and source for builtin lints with default settings.
5+
//
6+
// Ideally, we'd like to use lints that are part of `unused` group as shown in the issue.
7+
// This is not possible in an ui test, because `unused` lints are enabled with `-A unused`
8+
// in such tests, and the we're testing a scenario with no modification to the default settings.
9+
10+
fn main() {
11+
let WrongCase = 1;
12+
//~^ WARN [non_snake_case]
13+
//~| NOTE `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default
14+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
warning: variable `WrongCase` should have a snake case name
2+
--> $DIR/default-groups-issue-65464.rs:11:9
3+
|
4+
LL | let WrongCase = 1;
5+
| ^^^^^^^^^ help: convert the identifier to snake case: `wrong_case`
6+
|
7+
= note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default
8+
9+
warning: 1 warning emitted
10+

0 commit comments

Comments
 (0)