2024-03-31 16:57:53 -05:00
error[E0004]: non-exhaustive patterns: `U8AsBool { n: 0_u8 }` and `U8AsBool { b: false }` not covered
2024-03-31 16:57:47 -05:00
--> $DIR/unions.rs:22:15
|
LL | match x {
2024-03-31 16:57:53 -05:00
| ^ patterns `U8AsBool { n: 0_u8 }` and `U8AsBool { b: false }` not covered
2024-03-31 16:57:47 -05:00
|
note: `U8AsBool` defined here
--> $DIR/unions.rs:3:11
|
LL | union U8AsBool {
| ^^^^^^^^
= note: the matched value is of type `U8AsBool`
2024-03-31 16:57:53 -05:00
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
2024-03-31 16:57:47 -05:00
|
LL ~ U8AsBool { n: 1.. } => {},
2024-03-31 16:57:53 -05:00
LL + U8AsBool { n: 0_u8 } | U8AsBool { b: false } => todo!()
2024-03-31 16:57:47 -05:00
|
2024-03-31 16:57:53 -05:00
error[E0004]: non-exhaustive patterns: `(U8AsBool { n: 0_u8 }, false)`, `(U8AsBool { b: false }, false)`, `(U8AsBool { n: 0_u8 }, false)` and 1 more not covered
--> $DIR/unions.rs:28:15
2024-03-31 16:57:47 -05:00
|
LL | match (x, true) {
2024-03-31 16:57:53 -05:00
| ^^^^^^^^^ patterns `(U8AsBool { n: 0_u8 }, false)`, `(U8AsBool { b: false }, false)`, `(U8AsBool { n: 0_u8 }, false)` and 1 more not covered
2024-03-31 16:57:47 -05:00
|
= note: the matched value is of type `(U8AsBool, bool)`
2024-03-31 16:57:53 -05:00
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown, or multiple match arms
2024-03-31 16:57:47 -05:00
|
LL ~ (U8AsBool { n: 1.. }, true) => {},
2024-03-31 16:57:53 -05:00
LL + _ => todo!()
2024-03-31 16:57:47 -05:00
|
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0004`.