rust/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.stderr

47 lines
1.7 KiB
Plaintext
Raw Normal View History

error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedEnum` is non-empty
2019-12-14 07:17:09 -06:00
--> $DIR/match.rs:19:11
|
LL | match x {}
| ^
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
= note: the matched value is of type `uninhabited::UninhabitedEnum`
2019-12-04 10:04:44 -06:00
error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedStruct` is non-empty
2019-12-14 07:17:09 -06:00
--> $DIR/match.rs:23:11
2019-05-04 06:07:04 -05:00
|
LL | match x {}
| ^
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
= note: the matched value is of type `uninhabited::UninhabitedStruct`
2019-05-04 06:07:04 -05:00
2019-12-04 10:04:44 -06:00
error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedTupleStruct` is non-empty
2019-12-14 07:17:09 -06:00
--> $DIR/match.rs:27:11
2019-05-04 06:07:04 -05:00
|
LL | match x {}
| ^
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
= note: the matched value is of type `uninhabited::UninhabitedTupleStruct`
2019-05-04 06:07:04 -05:00
2019-12-04 10:04:44 -06:00
error[E0004]: non-exhaustive patterns: `Tuple(_)` and `Struct { .. }` not covered
2019-12-14 07:17:09 -06:00
--> $DIR/match.rs:31:11
2019-05-04 06:07:04 -05:00
|
LL | match x {}
2019-12-04 10:04:44 -06:00
| ^ patterns `Tuple(_)` and `Struct { .. }` not covered
|
::: $DIR/auxiliary/uninhabited.rs:17:23
|
LL | #[non_exhaustive] Tuple(!),
| ----- not covered
LL | #[non_exhaustive] Struct { x: ! }
| ------ not covered
2019-05-04 06:07:04 -05:00
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
= note: the matched value is of type `uninhabited::UninhabitedVariants`
2019-05-04 06:07:04 -05:00
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0004`.