rust/tests/ui/reachable/expr_while.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
894 B
Plaintext
Raw Normal View History

2021-08-08 09:49:13 -05:00
error: unreachable block in `if` or `while` expression
--> $DIR/expr_while.rs:7:20
|
LL | while {return} {
| ____________------__^
| | |
| | any code following this expression is unreachable
LL | |
LL | | println!("Hello, world!");
LL | | }
2021-08-08 09:49:13 -05:00
| |_____^ unreachable block in `if` or `while` expression
|
2020-01-22 17:57:38 -06:00
note: the lint level is defined here
2018-12-25 09:56:47 -06:00
--> $DIR/expr_while.rs:4:9
|
2018-02-22 18:42:32 -06:00
LL | #![deny(unreachable_code)]
| ^^^^^^^^^^^^^^^^
2021-08-08 09:49:13 -05:00
error: unreachable block in `if` or `while` expression
--> $DIR/expr_while.rs:22:20
|
LL | while {return} {
| ____________------__^
| | |
| | any code following this expression is unreachable
LL | |
LL | | println!("I am dead.");
LL | | }
2021-08-08 09:49:13 -05:00
| |_____^ unreachable block in `if` or `while` expression
error: aborting due to 2 previous errors