fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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