os-rust/tests/ui/pattern/usefulness/explain-unreachable-pats.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

105 lines
2.8 KiB
Text
Raw Normal View History

error: unreachable pattern
2024-07-27 11:08:16 +02:00
--> $DIR/explain-unreachable-pats.rs:10:9
|
LL | (1 | 2,) => {}
| -------- matches all the relevant values
LL |
LL | (2,) => {}
| ^^^^ no value can reach this
|
note: the lint level is defined here
2024-07-27 11:08:16 +02:00
--> $DIR/explain-unreachable-pats.rs:2:9
|
LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
error: unreachable pattern
2024-07-27 11:08:16 +02:00
--> $DIR/explain-unreachable-pats.rs:21:9
|
2024-07-24 08:40:04 +02:00
LL | (1 | 2,) => {}
| ^^^^^^^^ no value can reach this
2024-07-24 08:40:04 +02:00
|
note: multiple earlier patterns match some of the same values
2024-07-27 11:08:16 +02:00
--> $DIR/explain-unreachable-pats.rs:21:9
2024-07-24 08:40:04 +02:00
|
LL | (1,) => {}
| ---- matches some of the same values
LL |
LL | (2,) => {}
| ---- matches some of the same values
LL |
LL | (1 | 2,) => {}
2024-07-24 08:40:04 +02:00
| ^^^^^^^^ collectively making this unreachable
error: unreachable pattern
2024-07-27 11:08:16 +02:00
--> $DIR/explain-unreachable-pats.rs:32:9
|
LL | Err(_) => {}
| ^^^^^^
|
= note: matches no values because `!` is uninhabited
error: unreachable pattern
2024-07-27 11:08:16 +02:00
--> $DIR/explain-unreachable-pats.rs:45:9
|
LL | (Err(_), Err(_)) => {}
| ^^^^^^^^^^^^^^^^
|
= note: matches no values because `Void2` is uninhabited
error: unreachable pattern
2024-07-27 11:08:16 +02:00
--> $DIR/explain-unreachable-pats.rs:51:9
|
LL | (Err(_), Err(_)) => {}
| ^^^^^^^^^^^^^^^^
|
= note: matches no values because `Void1` is uninhabited
error: unreachable pattern
2024-07-27 11:08:16 +02:00
--> $DIR/explain-unreachable-pats.rs:60:11
|
LL | if let (0
| - matches all the relevant values
LL |
LL | | 0, _) = (0, 0) {}
| ^ no value can reach this
error: unreachable pattern
2024-07-27 11:08:16 +02:00
--> $DIR/explain-unreachable-pats.rs:70:9
2024-07-24 08:40:04 +02:00
|
LL | (_, true) => {}
| ^^^^^^^^^ no value can reach this
2024-07-24 08:40:04 +02:00
|
note: multiple earlier patterns match some of the same values
2024-07-27 11:08:16 +02:00
--> $DIR/explain-unreachable-pats.rs:70:9
|
LL | (true, _) => {}
| --------- matches some of the same values
LL |
LL | (false, _) => {}
| ---------- matches some of the same values
LL |
LL | (_, true) => {}
2024-07-24 08:40:04 +02:00
| ^^^^^^^^^ collectively making this unreachable
error: unreachable pattern
2024-07-27 11:08:16 +02:00
--> $DIR/explain-unreachable-pats.rs:83:9
|
LL | (true, _) => {}
| --------- matches all the relevant values
...
LL | (true, true) => {}
| ^^^^^^^^^^^^ no value can reach this
error: unreachable pattern
2024-07-27 11:08:16 +02:00
--> $DIR/explain-unreachable-pats.rs:95:9
|
LL | (_, true, 0..10) => {}
| ---------------- matches all the relevant values
...
LL | (_, true, 3) => {}
| ^^^^^^^^^^^^ no value can reach this
error: aborting due to 9 previous errors