blob: d5b8a4e6d7955e4c3a7240654ed8debabebb8483 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
error: unreachable pattern
--> $DIR/match-arm-statics.rs:25:9
|
LL | TRUE_TRUE => (),
| --------- matches all the relevant values
...
LL | (true, true) => ()
| ^^^^^^^^^^^^ no value can reach this
|
note: the lint level is defined here
--> $DIR/match-arm-statics.rs:2:9
|
LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
error: unreachable pattern
--> $DIR/match-arm-statics.rs:40:9
|
LL | Some(Some(EAST)) => (),
| ---------------- matches all the relevant values
...
LL | Some(Some(East)) => (),
| ^^^^^^^^^^^^^^^^ no value can reach this
error: unreachable pattern
--> $DIR/match-arm-statics.rs:60:9
|
LL | Foo { bar: Some(EAST), baz: NewBool(false) } => ()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no value can reach this
|
note: multiple earlier patterns match some of the same values
--> $DIR/match-arm-statics.rs:60:9
|
LL | Foo { bar: _, baz: NEW_FALSE } => (),
| ------------------------------ matches some of the same values
...
LL | Foo { bar: Some(EAST), .. } => (),
| --------------------------- matches some of the same values
LL | Foo { bar: Some(North), baz: NewBool(true) } => (),
LL | Foo { bar: Some(EAST), baz: NewBool(false) } => ()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ collectively making this unreachable
error: aborting due to 3 previous errors
|