rust/src/test/ui/reachable/unwarned-match-on-never.stderr

36 lines
965 B
Plaintext
Raw Normal View History

error: unreachable expression
--> $DIR/unwarned-match-on-never.rs:8:5
|
2019-03-09 06:03:44 -06:00
LL | match x {}
| - any code following this expression is unreachable
LL | // But matches in unreachable code are warned.
LL | match x {}
| ^^^^^^^^^^ unreachable expression
|
note: lint level defined here
--> $DIR/unwarned-match-on-never.rs:1:9
|
LL | #![deny(unreachable_code)]
| ^^^^^^^^^^^^^^^^
error: unreachable arm
--> $DIR/unwarned-match-on-never.rs:13:15
|
LL | match (return) {
| -------- any code following this expression is unreachable
LL | () => ()
| ^^ unreachable arm
error: unreachable expression
--> $DIR/unwarned-match-on-never.rs:19:5
|
LL | return;
| ------ any code following this expression is unreachable
2019-03-09 06:03:44 -06:00
LL | / match () {
LL | | () => (),
LL | | }
| |_____^ unreachable expression
error: aborting due to 3 previous errors