2024-01-18 08:06:46 -06:00
|
|
|
error: unreachable pattern
|
|
|
|
--> $DIR/unreachable.rs:17:9
|
|
|
|
|
|
|
|
|
LL | Err(!),
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
note: the lint level is defined here
|
|
|
|
--> $DIR/unreachable.rs:7:9
|
|
|
|
|
|
|
|
|
LL | #![deny(unreachable_patterns)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: unreachable pattern
|
2024-01-18 07:59:48 -06:00
|
|
|
--> $DIR/unreachable.rs:20:19
|
|
|
|
|
|
|
|
|
LL | let (Ok(_x) | Err(!)) = res_void;
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: unreachable pattern
|
|
|
|
--> $DIR/unreachable.rs:22:12
|
2024-01-18 08:06:46 -06:00
|
|
|
|
|
|
|
|
LL | if let Err(!) = res_void {}
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: unreachable pattern
|
2024-01-18 07:59:48 -06:00
|
|
|
--> $DIR/unreachable.rs:24:24
|
2024-01-18 08:06:46 -06:00
|
|
|
|
|
|
|
|
LL | if let (Ok(true) | Err(!)) = res_void {}
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: unreachable pattern
|
2024-01-18 07:59:48 -06:00
|
|
|
--> $DIR/unreachable.rs:26:23
|
2024-01-18 08:06:46 -06:00
|
|
|
|
|
|
|
|
LL | for (Ok(mut _x) | Err(!)) in [res_void] {}
|
|
|
|
| ^^^^^^
|
|
|
|
|
2024-01-18 07:59:48 -06:00
|
|
|
error: unreachable pattern
|
|
|
|
--> $DIR/unreachable.rs:30:18
|
|
|
|
|
|
|
|
|
LL | fn foo((Ok(_x) | Err(!)): Result<bool, Void>) {}
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
2024-01-18 08:06:46 -06:00
|
|
|
|