3 #![feature(lint_reasons)]
7 // The warnings are not double triggers, they identify different unfulfilled lint
8 // expectations one for each listed lint.
10 #[expect(unused_variables, unused_mut, while_true)]
11 //~^ WARNING this lint expectation is unfulfilled [unfulfilled_lint_expectations]
12 //~| NOTE `#[warn(unfulfilled_lint_expectations)]` on by default
13 //~| WARNING this lint expectation is unfulfilled [unfulfilled_lint_expectations]
14 fn check_multiple_lints_1() {
15 // This only trigger `unused_variables`
19 #[expect(unused_variables, unused_mut, while_true)]
20 //~^ WARNING this lint expectation is unfulfilled [unfulfilled_lint_expectations]
21 //~| WARNING this lint expectation is unfulfilled [unfulfilled_lint_expectations]
22 fn check_multiple_lints_2() {
23 // This only triggers `unused_mut`
25 println!("I use x: {}", x);
28 #[expect(unused_variables, unused_mut, while_true)]
29 //~^ WARNING this lint expectation is unfulfilled [unfulfilled_lint_expectations]
30 //~| WARNING this lint expectation is unfulfilled [unfulfilled_lint_expectations]
31 fn check_multiple_lints_3() {
32 // This only triggers `while_true` which is also an early lint
36 #[expect(unused, while_true)]
37 //~^ WARNING this lint expectation is unfulfilled [unfulfilled_lint_expectations]
38 fn check_multiple_lints_with_lint_group_1() {
42 println!("I use x: {}", x);
45 #[expect(unused, while_true)]
46 //~^ WARNING this lint expectation is unfulfilled [unfulfilled_lint_expectations]
47 fn check_multiple_lints_with_lint_group_2() {
52 check_multiple_lints_1();
53 check_multiple_lints_2();
54 check_multiple_lints_3();
56 check_multiple_lints_with_lint_group_1();
57 check_multiple_lints_with_lint_group_2();