]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/rfc-2383-lint-reason/expect_nested_lint_levels.stderr
Test `expect` with `forbid` and fix doc errors (RFC-2383)
[rust.git] / src / test / ui / lint / rfc-2383-lint-reason / expect_nested_lint_levels.stderr
1 error: unused variable: `this_is_my_function`
2   --> $DIR/expect_nested_lint_levels.rs:48:9
3    |
4 LL |     let this_is_my_function = 3;
5    |         ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_this_is_my_function`
6    |
7 note: the lint level is defined here
8   --> $DIR/expect_nested_lint_levels.rs:45:10
9    |
10 LL | #[forbid(unused_variables)]
11    |          ^^^^^^^^^^^^^^^^
12
13 warning: variable does not need to be mutable
14   --> $DIR/expect_nested_lint_levels.rs:36:13
15    |
16 LL |         let mut v = 0;
17    |             ----^
18    |             |
19    |             help: remove this `mut`
20    |
21    = note: this overrides the previous `expect` lint level and warns about the `unused_mut` lint here
22 note: the lint level is defined here
23   --> $DIR/expect_nested_lint_levels.rs:31:9
24    |
25 LL |         unused_mut,
26    |         ^^^^^^^^^^
27
28 warning: this lint expectation is unfulfilled
29   --> $DIR/expect_nested_lint_levels.rs:23:5
30    |
31 LL |     unused_mut,
32    |     ^^^^^^^^^^
33    |
34    = note: `#[warn(unfulfilled_lint_expectations)]` on by default
35    = note: this `expect` is overridden by a `warn` attribute before the `unused_mut` lint is triggered
36
37 warning: this lint expectation is unfulfilled
38   --> $DIR/expect_nested_lint_levels.rs:7:5
39    |
40 LL |     unused_mut,
41    |     ^^^^^^^^^^
42    |
43    = note: this `expect` is overridden by a `allow` attribute before the `unused_mut` lint is triggered
44
45 warning: this lint expectation is unfulfilled
46   --> $DIR/expect_nested_lint_levels.rs:43:10
47    |
48 LL | #[expect(unused_variables)]
49    |          ^^^^^^^^^^^^^^^^
50
51 error: aborting due to previous error; 4 warnings emitted
52