]>
Commit | Line | Data |
---|---|---|
f2b60f7d | 1 | error[E0004]: non-exhaustive patterns: `T::A` not covered |
dfeec247 | 2 | --> $DIR/non-exhaustive-match.rs:7:11 |
b7449926 | 3 | | |
532ac7d7 | 4 | LL | match x { T::B => { } } |
f2b60f7d | 5 | | ^ pattern `T::A` not covered |
532ac7d7 | 6 | | |
5e7ed085 FG |
7 | note: `T` defined here |
8 | --> $DIR/non-exhaustive-match.rs:3:10 | |
9 | | | |
10 | LL | enum T { A, B } | |
11 | | - ^ not covered | |
ba9703b0 | 12 | = note: the matched value is of type `T` |
5e7ed085 FG |
13 | help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown |
14 | | | |
f2b60f7d FG |
15 | LL | match x { T::B => { }, T::A => todo!() } |
16 | | +++++++++++++++++ | |
b7449926 XL |
17 | |
18 | error[E0004]: non-exhaustive patterns: `false` not covered | |
dfeec247 | 19 | --> $DIR/non-exhaustive-match.rs:8:11 |
b7449926 | 20 | | |
532ac7d7 | 21 | LL | match true { |
b7449926 | 22 | | ^^^^ pattern `false` not covered |
532ac7d7 | 23 | | |
ba9703b0 | 24 | = note: the matched value is of type `bool` |
5e7ed085 FG |
25 | help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown |
26 | | | |
27 | LL ~ true => {} | |
28 | LL + false => todo!() | |
29 | | | |
b7449926 XL |
30 | |
31 | error[E0004]: non-exhaustive patterns: `Some(_)` not covered | |
dfeec247 | 32 | --> $DIR/non-exhaustive-match.rs:11:11 |
b7449926 | 33 | | |
532ac7d7 | 34 | LL | match Some(10) { |
b7449926 | 35 | | ^^^^^^^^ pattern `Some(_)` not covered |
94222f64 | 36 | | |
5e7ed085 FG |
37 | note: `Option<i32>` defined here |
38 | --> $SRC_DIR/core/src/option.rs:LL:COL | |
39 | | | |
064997fb FG |
40 | LL | pub enum Option<T> { |
41 | | ------------------ | |
42 | ... | |
43 | LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T), | |
44 | | ^^^^ not covered | |
5e7ed085 FG |
45 | = note: the matched value is of type `Option<i32>` |
46 | help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown | |
ba9703b0 | 47 | | |
5e7ed085 FG |
48 | LL ~ None => {} |
49 | LL + Some(_) => todo!() | |
532ac7d7 | 50 | | |
b7449926 | 51 | |
f035d41b | 52 | error[E0004]: non-exhaustive patterns: `(_, _, i32::MIN..=3_i32)` and `(_, _, 5_i32..=i32::MAX)` not covered |
dfeec247 | 53 | --> $DIR/non-exhaustive-match.rs:14:11 |
b7449926 | 54 | | |
532ac7d7 | 55 | LL | match (2, 3, 4) { |
f035d41b | 56 | | ^^^^^^^^^ patterns `(_, _, i32::MIN..=3_i32)` and `(_, _, 5_i32..=i32::MAX)` not covered |
532ac7d7 | 57 | | |
ba9703b0 | 58 | = note: the matched value is of type `(i32, i32, i32)` |
5e7ed085 FG |
59 | help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms |
60 | | | |
61 | LL ~ (_, _, 4) => {} | |
62 | LL + (_, _, i32::MIN..=3_i32) | (_, _, 5_i32..=i32::MAX) => todo!() | |
63 | | | |
b7449926 | 64 | |
f2b60f7d | 65 | error[E0004]: non-exhaustive patterns: `(T::A, T::A)` and `(T::B, T::B)` not covered |
dfeec247 | 66 | --> $DIR/non-exhaustive-match.rs:18:11 |
b7449926 | 67 | | |
532ac7d7 | 68 | LL | match (T::A, T::A) { |
f2b60f7d | 69 | | ^^^^^^^^^^^^ patterns `(T::A, T::A)` and `(T::B, T::B)` not covered |
532ac7d7 | 70 | | |
ba9703b0 | 71 | = note: the matched value is of type `(T, T)` |
5e7ed085 FG |
72 | help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms |
73 | | | |
74 | LL ~ (T::B, T::A) => {} | |
f2b60f7d | 75 | LL + (T::A, T::A) | (T::B, T::B) => todo!() |
5e7ed085 | 76 | | |
b7449926 | 77 | |
f2b60f7d | 78 | error[E0004]: non-exhaustive patterns: `T::B` not covered |
dfeec247 | 79 | --> $DIR/non-exhaustive-match.rs:22:11 |
b7449926 | 80 | | |
532ac7d7 | 81 | LL | match T::A { |
f2b60f7d | 82 | | ^^^^ pattern `T::B` not covered |
532ac7d7 | 83 | | |
5e7ed085 FG |
84 | note: `T` defined here |
85 | --> $DIR/non-exhaustive-match.rs:3:13 | |
86 | | | |
87 | LL | enum T { A, B } | |
88 | | - ^ not covered | |
ba9703b0 | 89 | = note: the matched value is of type `T` |
5e7ed085 FG |
90 | help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown |
91 | | | |
92 | LL ~ T::A => {} | |
f2b60f7d | 93 | LL + T::B => todo!() |
5e7ed085 | 94 | | |
b7449926 XL |
95 | |
96 | error[E0004]: non-exhaustive patterns: `[]` not covered | |
dfeec247 | 97 | --> $DIR/non-exhaustive-match.rs:33:11 |
b7449926 | 98 | | |
532ac7d7 | 99 | LL | match *vec { |
b7449926 | 100 | | ^^^^ pattern `[]` not covered |
532ac7d7 | 101 | | |
1b1a35ee | 102 | = note: the matched value is of type `[Option<isize>]` |
5e7ed085 FG |
103 | help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown |
104 | | | |
105 | LL ~ [None] => {} | |
106 | LL + [] => todo!() | |
107 | | | |
b7449926 | 108 | |
60c5eb7d | 109 | error[E0004]: non-exhaustive patterns: `[_, _, _, _, ..]` not covered |
dfeec247 | 110 | --> $DIR/non-exhaustive-match.rs:46:11 |
b7449926 | 111 | | |
532ac7d7 | 112 | LL | match *vec { |
60c5eb7d | 113 | | ^^^^ pattern `[_, _, _, _, ..]` not covered |
532ac7d7 | 114 | | |
ba9703b0 | 115 | = note: the matched value is of type `[f32]` |
5e7ed085 FG |
116 | help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown |
117 | | | |
118 | LL ~ [] => (), | |
119 | LL + [_, _, _, _, ..] => todo!() | |
120 | | | |
b7449926 XL |
121 | |
122 | error: aborting due to 8 previous errors | |
123 | ||
124 | For more information about this error, try `rustc --explain E0004`. |