2024-01-18 08:06:46 -06:00
|
|
|
error: unreachable pattern
|
2024-07-27 04:08:16 -05:00
|
|
|
--> $DIR/unreachable.rs:16:9
|
2024-01-18 08:06:46 -06:00
|
|
|
|
|
|
|
|
LL | Err(!),
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
2024-07-21 07:46:05 -05:00
|
|
|
= note: this pattern matches no values because `Void` is uninhabited
|
2024-01-18 08:06:46 -06:00
|
|
|
note: the lint level is defined here
|
2024-07-27 04:08:16 -05:00
|
|
|
--> $DIR/unreachable.rs:6:9
|
2024-01-18 08:06:46 -06:00
|
|
|
|
|
|
|
|
LL | #![deny(unreachable_patterns)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: unreachable pattern
|
2024-07-27 04:08:16 -05:00
|
|
|
--> $DIR/unreachable.rs:19:19
|
2024-01-18 07:59:48 -06:00
|
|
|
|
|
|
|
|
LL | let (Ok(_x) | Err(!)) = res_void;
|
|
|
|
| ^^^^^^
|
2024-07-21 07:46:05 -05:00
|
|
|
|
|
|
|
|
= note: this pattern matches no values because `Void` is uninhabited
|
2024-01-18 07:59:48 -06:00
|
|
|
|
|
|
|
error: unreachable pattern
|
2024-07-27 04:08:16 -05:00
|
|
|
--> $DIR/unreachable.rs:21:12
|
2024-01-18 08:06:46 -06:00
|
|
|
|
|
|
|
|
LL | if let Err(!) = res_void {}
|
|
|
|
| ^^^^^^
|
2024-07-21 07:46:05 -05:00
|
|
|
|
|
|
|
|
= note: this pattern matches no values because `Void` is uninhabited
|
2024-01-18 08:06:46 -06:00
|
|
|
|
|
|
|
error: unreachable pattern
|
2024-07-27 04:08:16 -05:00
|
|
|
--> $DIR/unreachable.rs:23:24
|
2024-01-18 08:06:46 -06:00
|
|
|
|
|
|
|
|
LL | if let (Ok(true) | Err(!)) = res_void {}
|
|
|
|
| ^^^^^^
|
2024-07-21 07:46:05 -05:00
|
|
|
|
|
|
|
|
= note: this pattern matches no values because `Void` is uninhabited
|
2024-01-18 08:06:46 -06:00
|
|
|
|
|
|
|
error: unreachable pattern
|
2024-07-27 04:08:16 -05:00
|
|
|
--> $DIR/unreachable.rs:25:23
|
2024-01-18 08:06:46 -06:00
|
|
|
|
|
|
|
|
LL | for (Ok(mut _x) | Err(!)) in [res_void] {}
|
|
|
|
| ^^^^^^
|
2024-07-21 07:46:05 -05:00
|
|
|
|
|
|
|
|
= note: this pattern matches no values because `Void` is uninhabited
|
2024-01-18 08:06:46 -06:00
|
|
|
|
2024-01-18 07:59:48 -06:00
|
|
|
error: unreachable pattern
|
2024-07-27 04:08:16 -05:00
|
|
|
--> $DIR/unreachable.rs:29:18
|
2024-01-18 07:59:48 -06:00
|
|
|
|
|
|
|
|
LL | fn foo((Ok(_x) | Err(!)): Result<bool, Void>) {}
|
|
|
|
| ^^^^^^
|
2024-07-21 07:46:05 -05:00
|
|
|
|
|
|
|
|
= note: this pattern matches no values because `Void` is uninhabited
|
2024-01-18 07:59:48 -06:00
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
2024-01-18 08:06:46 -06:00
|
|
|
|