rust/tests/ui/rfcs/rfc-0000-never_patterns/unreachable.normal.stderr
2024-08-10 12:07:17 +02:00

45 lines
1006 B
Plaintext

error: unreachable pattern
--> $DIR/unreachable.rs:16:9
|
LL | Err(!),
| ^^^^^^
|
note: the lint level is defined here
--> $DIR/unreachable.rs:6:9
|
LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
error: unreachable pattern
--> $DIR/unreachable.rs:19:19
|
LL | let (Ok(_x) | Err(!)) = res_void;
| ^^^^^^
error: unreachable pattern
--> $DIR/unreachable.rs:21:12
|
LL | if let Err(!) = res_void {}
| ^^^^^^
error: unreachable pattern
--> $DIR/unreachable.rs:23:24
|
LL | if let (Ok(true) | Err(!)) = res_void {}
| ^^^^^^
error: unreachable pattern
--> $DIR/unreachable.rs:25:23
|
LL | for (Ok(mut _x) | Err(!)) in [res_void] {}
| ^^^^^^
error: unreachable pattern
--> $DIR/unreachable.rs:29:18
|
LL | fn foo((Ok(_x) | Err(!)): Result<bool, Void>) {}
| ^^^^^^
error: aborting due to 6 previous errors