]> git.lizzy.rs Git - rust.git/blob - src/test/ui/pattern/usefulness/stable-gated-patterns.stderr
Auto merge of #94243 - compiler-errors:compiler-flags-typo, r=Mark-Simulacrum
[rust.git] / src / test / ui / pattern / usefulness / stable-gated-patterns.stderr
1 error[E0004]: non-exhaustive patterns: `Stable2` and `_` not covered
2   --> $DIR/stable-gated-patterns.rs:8:11
3    |
4 LL |     match UnstableEnum::Stable {
5    |           ^^^^^^^^^^^^^^^^^^^^ patterns `Stable2` and `_` not covered
6    |
7 note: `UnstableEnum` defined here
8   --> $DIR/auxiliary/unstable.rs:9:5
9    |
10 LL | / pub enum UnstableEnum {
11 LL | |     #[stable(feature = "stable_test_feature", since = "1.0.0")]
12 LL | |     Stable,
13 LL | |     #[stable(feature = "stable_test_feature", since = "1.0.0")]
14 LL | |     Stable2,
15    | |     ^^^^^^^ not covered
16 LL | |     #[unstable(feature = "unstable_test_feature", issue = "none")]
17 LL | |     Unstable,
18 LL | | }
19    | |_-
20    = note: the matched value is of type `UnstableEnum`
21 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
22    |
23 LL ~         UnstableEnum::Stable => {}
24 LL +         Stable2 | _ => todo!()
25    |
26
27 error[E0004]: non-exhaustive patterns: `_` not covered
28   --> $DIR/stable-gated-patterns.rs:13:11
29    |
30 LL |     match UnstableEnum::Stable {
31    |           ^^^^^^^^^^^^^^^^^^^^ pattern `_` not covered
32    |
33 note: `UnstableEnum` defined here
34   --> $DIR/auxiliary/unstable.rs:5:1
35    |
36 LL | / pub enum UnstableEnum {
37 LL | |     #[stable(feature = "stable_test_feature", since = "1.0.0")]
38 LL | |     Stable,
39 LL | |     #[stable(feature = "stable_test_feature", since = "1.0.0")]
40 ...  |
41 LL | |     Unstable,
42 LL | | }
43    | |_^
44    = note: the matched value is of type `UnstableEnum`
45 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
46    |
47 LL ~         UnstableEnum::Stable2 => {}
48 LL +         _ => todo!()
49    |
50
51 error: aborting due to 2 previous errors
52
53 For more information about this error, try `rustc --explain E0004`.