]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/2229_closure_analysis/match/issue-88331.stderr
Auto merge of #105716 - chriswailes:ndk-update-redux, r=pietroalbini
[rust.git] / tests / ui / closures / 2229_closure_analysis / match / issue-88331.stderr
1 error[E0004]: non-exhaustive patterns: `Opcode(0_u8)` and `Opcode(2_u8..=u8::MAX)` not covered
2   --> $DIR/issue-88331.rs:11:20
3    |
4 LL |     move |i| match msg_type {
5    |                    ^^^^^^^^ patterns `Opcode(0_u8)` and `Opcode(2_u8..=u8::MAX)` not covered
6    |
7 note: `Opcode` defined here
8   --> $DIR/issue-88331.rs:4:12
9    |
10 LL | pub struct Opcode(pub u8);
11    |            ^^^^^^
12    = note: the matched value is of type `Opcode`
13 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
14    |
15 LL ~         Opcode::OP1 => unimplemented!(),
16 LL ~         Opcode(0_u8) | Opcode(2_u8..=u8::MAX) => todo!(),
17    |
18
19 error[E0004]: non-exhaustive patterns: `Opcode2(Opcode(0_u8))` and `Opcode2(Opcode(2_u8..=u8::MAX))` not covered
20   --> $DIR/issue-88331.rs:27:20
21    |
22 LL |     move |i| match msg_type {
23    |                    ^^^^^^^^ patterns `Opcode2(Opcode(0_u8))` and `Opcode2(Opcode(2_u8..=u8::MAX))` not covered
24    |
25 note: `Opcode2` defined here
26   --> $DIR/issue-88331.rs:18:12
27    |
28 LL | pub struct Opcode2(Opcode);
29    |            ^^^^^^^
30    = note: the matched value is of type `Opcode2`
31 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
32    |
33 LL ~         Opcode2::OP2=> unimplemented!(),
34 LL ~         Opcode2(Opcode(0_u8)) | Opcode2(Opcode(2_u8..=u8::MAX)) => todo!(),
35    |
36
37 error: aborting due to 2 previous errors
38
39 For more information about this error, try `rustc --explain E0004`.