os-rust/src/test/ui/reachable/unreachable-try-pattern.stderr

34 lines
1.1 KiB
Text
Raw Normal View History

2018-08-08 14:28:26 +02:00
warning: unreachable expression
2018-12-25 08:56:47 -07:00
--> $DIR/unreachable-try-pattern.rs:19:36
2018-08-08 14:28:26 +02:00
|
LL | let y = (match x { Ok(n) => Ok(n as u32), Err(e) => Err(e) })?;
| -^^^^^^^
| |
| unreachable expression
| any code following this expression is unreachable
2018-08-08 14:28:26 +02:00
|
note: lint level defined here
2018-12-25 08:56:47 -07:00
--> $DIR/unreachable-try-pattern.rs:3:9
2018-08-08 14:28:26 +02:00
|
LL | #![warn(unreachable_code)]
| ^^^^^^^^^^^^^^^^
warning: unreachable pattern
2018-12-25 08:56:47 -07:00
--> $DIR/unreachable-try-pattern.rs:19:24
2018-08-08 14:28:26 +02:00
|
LL | let y = (match x { Ok(n) => Ok(n as u32), Err(e) => Err(e) })?;
| ^^^^^
|
note: lint level defined here
2018-12-25 08:56:47 -07:00
--> $DIR/unreachable-try-pattern.rs:4:9
2018-08-08 14:28:26 +02:00
|
LL | #![warn(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
warning: unreachable pattern
2018-12-25 08:56:47 -07:00
--> $DIR/unreachable-try-pattern.rs:30:40
2018-08-08 14:28:26 +02:00
|
LL | let y = (match x { Ok(n) => Ok(n), Err(e) => Err(e) })?;
| ^^^^^^