|
| 1 | +error[E0004]: non-exhaustive patterns: `U8AsBool { n: 0_u8, b: false }` not covered |
| 2 | + --> $DIR/unions.rs:22:15 |
| 3 | + | |
| 4 | +LL | match x { |
| 5 | + | ^ pattern `U8AsBool { n: 0_u8, b: false }` not covered |
| 6 | + | |
| 7 | +note: `U8AsBool` defined here |
| 8 | + --> $DIR/unions.rs:3:11 |
| 9 | + | |
| 10 | +LL | union U8AsBool { |
| 11 | + | ^^^^^^^^ |
| 12 | + = note: the matched value is of type `U8AsBool` |
| 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 | + | |
| 15 | +LL ~ U8AsBool { n: 1.. } => {}, |
| 16 | +LL + U8AsBool { n: 0_u8, b: false } => todo!() |
| 17 | + | |
| 18 | + |
| 19 | +error[E0004]: non-exhaustive patterns: `(U8AsBool { n: 0_u8, b: false }, false)` and `(U8AsBool { n: 0_u8, b: true }, false)` not covered |
| 20 | + --> $DIR/unions.rs:27:15 |
| 21 | + | |
| 22 | +LL | match (x, true) { |
| 23 | + | ^^^^^^^^^ patterns `(U8AsBool { n: 0_u8, b: false }, false)` and `(U8AsBool { n: 0_u8, b: true }, false)` not covered |
| 24 | + | |
| 25 | + = note: the matched value is of type `(U8AsBool, bool)` |
| 26 | +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 |
| 27 | + | |
| 28 | +LL ~ (U8AsBool { n: 1.. }, true) => {}, |
| 29 | +LL + (U8AsBool { n: 0_u8, b: false }, false) | (U8AsBool { n: 0_u8, b: true }, false) => todo!() |
| 30 | + | |
| 31 | + |
| 32 | +error: aborting due to 2 previous errors |
| 33 | + |
| 34 | +For more information about this error, try `rustc --explain E0004`. |
0 commit comments