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