]> git.proxmox.com Git - rustc.git/blob - src/test/ui/reachable/expr_while.stderr
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / reachable / expr_while.stderr
1 error: unreachable block in `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 `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 `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 `while` expression
30
31 error: aborting due to 2 previous errors
32