]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/2229_closure_analysis/match/issue-88331.stderr
When finding a match expr with a single arm that requires more, suggest it
[rust.git] / src / test / 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 | pub struct Opcode(pub u8);
5    | -------------------------- `Opcode` defined here
6 ...
7 LL |     move |i| match msg_type {
8    |                    ^^^^^^^^ patterns `Opcode(0_u8)` and `Opcode(2_u8..=u8::MAX)` not covered
9    |
10    = note: the matched value is of type `Opcode`
11 help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
12    |
13 LL ~         Opcode::OP1 => unimplemented!(),
14 LL ~         Opcode(0_u8) | Opcode(2_u8..=u8::MAX) => todo!(),
15    |
16
17 error[E0004]: non-exhaustive patterns: `Opcode2(Opcode(0_u8))` and `Opcode2(Opcode(2_u8..=u8::MAX))` not covered
18   --> $DIR/issue-88331.rs:27:20
19    |
20 LL | pub struct Opcode2(Opcode);
21    | --------------------------- `Opcode2` defined here
22 ...
23 LL |     move |i| match msg_type {
24    |                    ^^^^^^^^ patterns `Opcode2(Opcode(0_u8))` and `Opcode2(Opcode(2_u8..=u8::MAX))` not covered
25    |
26    = note: the matched value is of type `Opcode2`
27 help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
28    |
29 LL ~         Opcode2::OP2=> unimplemented!(),
30 LL ~         Opcode2(Opcode(0_u8)) | Opcode2(Opcode(2_u8..=u8::MAX)) => todo!(),
31    |
32
33 error: aborting due to 2 previous errors
34
35 For more information about this error, try `rustc --explain E0004`.