error[E0004]: non-exhaustive patterns: type `UninhabitedStruct` is non-empty --> $DIR/match_same_crate.rs:30:11 | LL | / pub struct UninhabitedStruct { LL | | _priv: !, LL | | } | |_- `UninhabitedStruct` defined here ... LL | match x {} | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: type `UninhabitedTupleStruct` is non-empty --> $DIR/match_same_crate.rs:34:11 | LL | pub struct UninhabitedTupleStruct(!); | ------------------------------------- `UninhabitedTupleStruct` defined here ... LL | match x {} | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: `Tuple(_)` and `Struct { .. }` not covered --> $DIR/match_same_crate.rs:38:11 | LL | / pub enum UninhabitedVariants { LL | | #[non_exhaustive] Tuple(!), | | ----- not covered LL | | #[non_exhaustive] Struct { x: ! } | | ------ not covered LL | | } | |_- `UninhabitedVariants` defined here ... LL | match x {} | ^ patterns `Tuple(_)` and `Struct { .. }` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0004`.