2022-09-03 03:01:35 +00:00
error[E0004]: non-exhaustive patterns: `UnstableEnum::Stable2` and `_` not covered
2021-09-18 20:52:43 +00:00
--> $DIR/stable-gated-patterns.rs:8:11
|
2022-03-12 20:38:44 +00:00
LL | match UnstableEnum::Stable {
2022-09-03 03:01:35 +00:00
| ^^^^^^^^^^^^^^^^^^^^ patterns `UnstableEnum::Stable2` and `_` not covered
2021-09-18 20:52:43 +00:00
|
2022-03-12 20:38:44 +00:00
note: `UnstableEnum` defined here
2023-10-29 05:50:59 +00:00
--> $DIR/auxiliary/unstable.rs:5:1
2021-12-16 05:06:44 +00:00
|
2022-02-13 15:27:59 +00:00
LL | pub enum UnstableEnum {
2023-10-29 05:50:59 +00:00
| ^^^^^^^^^^^^^^^^^^^^^
2022-02-13 15:27:59 +00:00
...
LL | Stable2,
2023-10-29 05:50:59 +00:00
| ------- not covered
2022-03-12 20:38:44 +00:00
= note: the matched value is of type `UnstableEnum`
2021-12-16 22:46:13 +00: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
2021-12-16 02:14:17 +00:00
|
2023-02-27 17:43:39 +00:00
LL ~ UnstableEnum::Stable => {},
2022-09-03 03:01:35 +00:00
LL + UnstableEnum::Stable2 | _ => todo!()
2021-12-16 02:14:17 +00:00
|
2021-09-18 20:52:43 +00:00
error[E0004]: non-exhaustive patterns: `_` not covered
--> $DIR/stable-gated-patterns.rs:13:11
|
2022-03-12 20:38:44 +00:00
LL | match UnstableEnum::Stable {
| ^^^^^^^^^^^^^^^^^^^^ pattern `_` not covered
2021-09-18 20:52:43 +00:00
|
2022-03-12 20:38:44 +00:00
note: `UnstableEnum` defined here
2021-12-16 05:06:44 +00:00
--> $DIR/auxiliary/unstable.rs:5:1
|
2022-02-13 15:27:59 +00:00
LL | pub enum UnstableEnum {
| ^^^^^^^^^^^^^^^^^^^^^
2022-03-12 20:38:44 +00:00
= note: the matched value is of type `UnstableEnum`
2021-12-16 22:46:13 +00:00
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
2021-12-16 02:28:09 +00:00
|
2023-02-27 17:43:39 +00:00
LL ~ UnstableEnum::Stable2 => {},
2021-12-16 02:28:09 +00:00
LL + _ => todo!()
|
2021-09-18 20:52:43 +00:00
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0004`.