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 14:49:13 +00: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 14:49:13 +00:00
| |_____^ unreachable block in `if` or `while` expression
|
2020-01-22 23:57:38 +00:00
note: the lint level is defined here
2018-12-25 15:56:47 +00:00
--> $DIR/expr_while.rs:4:9
|
2018-02-23 00:42:32 +00:00
LL | #![deny(unreachable_code)]
| ^^^^^^^^^^^^^^^^
2021-08-08 14:49:13 +00: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 14:49:13 +00:00
| |_____^ unreachable block in `if` or `while` expression
error: aborting due to 2 previous errors