2018-08-08 12:28:26 +00:00
|
|
|
warning: unreachable expression
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/unreachable-try-pattern.rs:19:36
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | let y = (match x { Ok(n) => Ok(n as u32), Err(e) => Err(e) })?;
|
2019-09-21 19:33:02 +00:00
|
|
|
| -^^^^^^^
|
|
|
|
| |
|
|
|
|
| unreachable expression
|
|
|
|
| any code following this expression is unreachable
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2020-01-22 23:57:38 +00:00
|
|
|
note: the lint level is defined here
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/unreachable-try-pattern.rs:3:9
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | #![warn(unreachable_code)]
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
warning: unreachable pattern
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/unreachable-try-pattern.rs:19:24
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | let y = (match x { Ok(n) => Ok(n as u32), Err(e) => Err(e) })?;
|
2024-08-19 19:33:48 +00:00
|
|
|
| ^^^^^-----------------
|
|
|
|
| |
|
|
|
|
| matches no values because `!` is uninhabited
|
|
|
|
| help: remove the match arm
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2024-08-19 19:08:18 +00:00
|
|
|
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
|
2020-01-22 23:57:38 +00:00
|
|
|
note: the lint level is defined here
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/unreachable-try-pattern.rs:4:9
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | #![warn(unreachable_patterns)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
warning: unreachable pattern
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/unreachable-try-pattern.rs:30:40
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | let y = (match x { Ok(n) => Ok(n), Err(e) => Err(e) })?;
|
2024-08-19 19:33:48 +00:00
|
|
|
| ^^^^^^----------
|
|
|
|
| |
|
|
|
|
| matches no values because `Void` is uninhabited
|
|
|
|
| help: remove the match arm
|
2024-07-21 12:46:05 +00:00
|
|
|
|
|
2024-08-19 19:08:18 +00:00
|
|
|
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2020-03-11 15:30:09 +00:00
|
|
|
warning: 3 warnings emitted
|
|
|
|
|