]> git.lizzy.rs Git - rust.git/blob - src/test/ui/reachable/expr_while.stderr
Merge commit '8da837185714cefbb261e93e9846afb11c1dc60e' into sync-rustfmt-subtree
[rust.git] / src / test / ui / reachable / expr_while.stderr
1 error: unreachable block in `if` or `while` expression
2   --> $DIR/expr_while.rs:7:20
3    |
4 LL |       while {return} {
5    |  ____________------__^
6    | |            |
7    | |            any code following this expression is unreachable
8 LL | |
9 LL | |         println!("Hello, world!");
10 LL | |     }
11    | |_____^ unreachable block in `if` or `while` expression
12    |
13 note: the lint level is defined here
14   --> $DIR/expr_while.rs:4:9
15    |
16 LL | #![deny(unreachable_code)]
17    |         ^^^^^^^^^^^^^^^^
18
19 error: unreachable block in `if` or `while` expression
20   --> $DIR/expr_while.rs:22:20
21    |
22 LL |       while {return} {
23    |  ____________------__^
24    | |            |
25    | |            any code following this expression is unreachable
26 LL | |
27 LL | |         println!("I am dead.");
28 LL | |     }
29    | |_____^ unreachable block in `if` or `while` expression
30
31 error: aborting due to 2 previous errors
32