]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/rfc-2383-lint-reason/expect_with_forbid.stderr
Test `expect` with `forbid` and fix doc errors (RFC-2383)
[rust.git] / src / test / ui / lint / rfc-2383-lint-reason / expect_with_forbid.stderr
1 error[E0453]: expect(unused_variables) incompatible with previous forbid
2   --> $DIR/expect_with_forbid.rs:6:10
3    |
4 LL | #[forbid(unused_variables)]
5    |          ---------------- `forbid` level set here
6 ...
7 LL | #[expect(unused_variables)]
8    |          ^^^^^^^^^^^^^^^^ overruled by previous forbid
9
10 error[E0453]: expect(while_true) incompatible with previous forbid
11   --> $DIR/expect_with_forbid.rs:17:10
12    |
13 LL | #[forbid(while_true)]
14    |          ---------- `forbid` level set here
15 ...
16 LL | #[expect(while_true)]
17    |          ^^^^^^^^^^ overruled by previous forbid
18
19 error[E0453]: expect(unused_variables) incompatible with previous forbid
20   --> $DIR/expect_with_forbid.rs:6:10
21    |
22 LL | #[forbid(unused_variables)]
23    |          ---------------- `forbid` level set here
24 ...
25 LL | #[expect(unused_variables)]
26    |          ^^^^^^^^^^^^^^^^ overruled by previous forbid
27
28 error[E0453]: expect(while_true) incompatible with previous forbid
29   --> $DIR/expect_with_forbid.rs:17:10
30    |
31 LL | #[forbid(while_true)]
32    |          ---------- `forbid` level set here
33 ...
34 LL | #[expect(while_true)]
35    |          ^^^^^^^^^^ overruled by previous forbid
36
37 error: denote infinite loops with `loop { ... }`
38   --> $DIR/expect_with_forbid.rs:26:5
39    |
40 LL |     while true {}
41    |     ^^^^^^^^^^ help: use `loop`
42    |
43 note: the lint level is defined here
44   --> $DIR/expect_with_forbid.rs:13:10
45    |
46 LL | #[forbid(while_true)]
47    |          ^^^^^^^^^^
48
49 error: aborting due to 5 previous errors
50
51 For more information about this error, try `rustc --explain E0453`.