rust/src/test/ui/reachable/expr_if.stderr

36 lines
900 B
Plaintext
Raw Normal View History

2019-03-18 22:47:07 -05:00
error: unreachable block in `if` expression
--> $DIR/expr_if.rs:7:17
|
2019-03-18 22:47:07 -05:00
LL | if {return} {
| _________________^
LL | | println!("Hello, world!");
LL | | }
| |_____^
|
note: lint level defined here
2018-12-25 09:56:47 -06:00
--> $DIR/expr_if.rs:4:9
|
2018-02-22 18:42:32 -06:00
LL | #![deny(unreachable_code)]
| ^^^^^^^^^^^^^^^^
note: any code following this expression is unreachable
--> $DIR/expr_if.rs:7:9
|
LL | if {return} {
| ^^^^^^
2019-03-18 22:47:07 -05:00
error: unreachable statement
--> $DIR/expr_if.rs:27:5
|
LL | println!("But I am.");
| ^^^^^^^^^^^^^^^^^^^^^^
|
note: any code following this expression is unreachable
--> $DIR/expr_if.rs:21:9
|
LL | return;
| ^^^^^^
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
2019-03-18 22:47:07 -05:00
error: aborting due to 2 previous errors