fork/rust

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

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

master
5.2 KiB131 linesraw
1error[E0004]: non-exhaustive patterns: `Foo { first: false, second: Some([_, _, _, _]) }` not covered
2  --> $DIR/non-exhaustive-pattern-witness.rs:7:11
3   |
4LL |     match (Foo { first: true, second: None }) {
5   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo { first: false, second: Some([_, _, _, _]) }` not covered
6   |
7note: `Foo` defined here
8  --> $DIR/non-exhaustive-pattern-witness.rs:1:8
9   |
10LL | struct Foo {
11   |        ^^^
12   = note: the matched value is of type `Foo`
13   = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
14   = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
15help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
16   |
17LL ~         Foo { first: false, second: Some([1, 2, 3, 4]) } => (),
18LL +         Foo { first: false, second: Some([_, _, _, _]) } => todo!()
19   |
20
21error[E0004]: non-exhaustive patterns: `Color::Red` not covered
22  --> $DIR/non-exhaustive-pattern-witness.rs:23:11
23   |
24LL |     match Color::Red {
25   |           ^^^^^^^^^^ pattern `Color::Red` not covered
26   |
27note: `Color` defined here
28  --> $DIR/non-exhaustive-pattern-witness.rs:17:5
29   |
30LL | enum Color {
31   |      -----
32LL |     Red,
33   |     ^^^ not covered
34   = note: the matched value is of type `Color`
35help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
36   |
37LL ~         Color::Green => (),
38LL +         Color::Red => todo!()
39   |
40
41error[E0004]: non-exhaustive patterns: `Direction::East`, `Direction::South` and `Direction::West` not covered
42  --> $DIR/non-exhaustive-pattern-witness.rs:35:11
43   |
44LL |     match Direction::North {
45   |           ^^^^^^^^^^^^^^^^ patterns `Direction::East`, `Direction::South` and `Direction::West` not covered
46   |
47note: `Direction` defined here
48  --> $DIR/non-exhaustive-pattern-witness.rs:31:12
49   |
50LL | enum Direction {
51   |      ---------
52LL |     North, East, South, West
53   |            ^^^^  ^^^^^  ^^^^ not covered
54   |            |     |
55   |            |     not covered
56   |            not covered
57   = note: the matched value is of type `Direction`
58help: 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
59   |
60LL ~         Direction::North => (),
61LL +         Direction::East | Direction::South | Direction::West => todo!()
62   |
63
64error[E0004]: non-exhaustive patterns: `ExcessiveEnum::Second`, `ExcessiveEnum::Third`, `ExcessiveEnum::Fourth` and 8 more not covered
65  --> $DIR/non-exhaustive-pattern-witness.rs:46:11
66   |
67LL |     match ExcessiveEnum::First {
68   |           ^^^^^^^^^^^^^^^^^^^^ patterns `ExcessiveEnum::Second`, `ExcessiveEnum::Third`, `ExcessiveEnum::Fourth` and 8 more not covered
69   |
70note: `ExcessiveEnum` defined here
71  --> $DIR/non-exhaustive-pattern-witness.rs:41:6
72   |
73LL | enum ExcessiveEnum {
74   |      ^^^^^^^^^^^^^
75   = note: the matched value is of type `ExcessiveEnum`
76help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown, or multiple match arms
77   |
78LL ~         ExcessiveEnum::First => (),
79LL +         _ => todo!()
80   |
81
82error[E0004]: non-exhaustive patterns: `Color::CustomRGBA { a: true, .. }` not covered
83  --> $DIR/non-exhaustive-pattern-witness.rs:54:11
84   |
85LL |     match Color::Red {
86   |           ^^^^^^^^^^ pattern `Color::CustomRGBA { a: true, .. }` not covered
87   |
88note: `Color` defined here
89  --> $DIR/non-exhaustive-pattern-witness.rs:19:5
90   |
91LL | enum Color {
92   |      -----
93...
94LL |     CustomRGBA { a: bool, r: u8, g: u8, b: u8 }
95   |     ^^^^^^^^^^ not covered
96   = note: the matched value is of type `Color`
97help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
98   |
99LL ~         Color::CustomRGBA { a: false, r: _, g: _, b: _ } => (),
100LL +         Color::CustomRGBA { a: true, .. } => todo!()
101   |
102
103error[E0004]: non-exhaustive patterns: `[Enum::Second(true), Enum::Second(false)]` not covered
104  --> $DIR/non-exhaustive-pattern-witness.rs:70:11
105   |
106LL |     match *x {
107   |           ^^ pattern `[Enum::Second(true), Enum::Second(false)]` not covered
108   |
109   = note: the matched value is of type `[Enum]`
110help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
111   |
112LL ~         [_, _, ref tail @ .., _] => (),
113LL +         [Enum::Second(true), Enum::Second(false)] => todo!()
114   |
115
116error[E0004]: non-exhaustive patterns: `((), false)` not covered
117  --> $DIR/non-exhaustive-pattern-witness.rs:83:11
118   |
119LL |     match ((), false) {
120   |           ^^^^^^^^^^^ pattern `((), false)` not covered
121   |
122   = note: the matched value is of type `((), bool)`
123help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
124   |
125LL ~         ((), true) => (),
126LL +         ((), false) => todo!()
127   |
128
129error: aborting due to 7 previous errors
130
131For more information about this error, try `rustc --explain E0004`.