You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/test/ui/pattern/usefulness/doc-hidden-non-exhaustive.stderr
+73-28
Original file line number
Diff line number
Diff line change
@@ -4,71 +4,116 @@ error[E0004]: non-exhaustive patterns: `_` not covered
4
4
LL | match HiddenEnum::A {
5
5
| ^^^^^^^^^^^^^ pattern `_` not covered
6
6
|
7
-
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
7
+
note: `HiddenEnum` defined here
8
+
--> $DIR/auxiliary/hidden.rs:1:1
9
+
|
10
+
LL | / pub enum HiddenEnum {
11
+
LL | | A,
12
+
LL | | B,
13
+
LL | | #[doc(hidden)]
14
+
LL | | C,
15
+
LL | | }
16
+
| |_^
8
17
= note: the matched value is of type `HiddenEnum`
18
+
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
19
+
|
20
+
LL ~ HiddenEnum::B => {}
21
+
LL + _ => todo!()
22
+
|
9
23
10
24
error[E0004]: non-exhaustive patterns: `B` not covered
11
25
--> $DIR/doc-hidden-non-exhaustive.rs:21:11
12
26
|
13
27
LL | match HiddenEnum::A {
14
28
| ^^^^^^^^^^^^^ pattern `B` not covered
15
29
|
16
-
note: `Foo` defined here
30
+
note: `HiddenEnum` defined here
17
31
--> $DIR/auxiliary/hidden.rs:3:5
18
32
|
19
-
LL | B,
20
-
| - not covered
21
-
|
22
-
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
33
+
LL | / pub enum HiddenEnum {
34
+
LL | | A,
35
+
LL | | B,
36
+
| | ^ not covered
37
+
LL | | #[doc(hidden)]
38
+
LL | | C,
39
+
LL | | }
40
+
| |_-
23
41
= note: the matched value is of type `HiddenEnum`
42
+
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
43
+
|
44
+
LL ~ HiddenEnum::C => {}
45
+
LL + B => todo!()
46
+
|
24
47
25
48
error[E0004]: non-exhaustive patterns: `B` and `_` not covered
26
49
--> $DIR/doc-hidden-non-exhaustive.rs:27:11
27
50
|
28
51
LL | match HiddenEnum::A {
29
52
| ^^^^^^^^^^^^^ patterns `B` and `_` not covered
30
53
|
31
-
note: `Foo` defined here
54
+
note: `HiddenEnum` defined here
32
55
--> $DIR/auxiliary/hidden.rs:3:5
33
56
|
34
-
LL | B,
35
-
| - not covered
36
-
|
37
-
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
57
+
LL | / pub enum HiddenEnum {
58
+
LL | | A,
59
+
LL | | B,
60
+
| | ^ not covered
61
+
LL | | #[doc(hidden)]
62
+
LL | | C,
63
+
LL | | }
64
+
| |_-
38
65
= note: the matched value is of type `HiddenEnum`
66
+
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
67
+
|
68
+
LL ~ HiddenEnum::A => {}
69
+
LL + B | _ => todo!()
70
+
|
39
71
40
72
error[E0004]: non-exhaustive patterns: `Some(B)` and `Some(_)` not covered
41
73
--> $DIR/doc-hidden-non-exhaustive.rs:32:11
42
74
|
43
75
LL | match None {
44
76
| ^^^^ patterns `Some(B)` and `Some(_)` not covered
45
77
|
46
-
note: `Option<Foo>` defined here
78
+
note: `Option<HiddenEnum>` defined here
47
79
--> $SRC_DIR/core/src/option.rs:LL:COL
48
80
|
49
-
LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
50
-
| ---- not covered
51
-
|
52
-
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
81
+
LL | / pub enum Option<T> {
82
+
LL | | /// No value.
83
+
LL | | #[lang = "None"]
84
+
LL | | #[stable(feature = "rust1", since = "1.0.0")]
85
+
... |
86
+
LL | | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
87
+
| | ^^^^ not covered
88
+
LL | | }
89
+
| |_-
53
90
= note: the matched value is of type `Option<HiddenEnum>`
91
+
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
92
+
|
93
+
LL ~ Some(HiddenEnum::A) => {}
94
+
LL + Some(B) | Some(_) => todo!()
95
+
|
54
96
55
97
error[E0004]: non-exhaustive patterns: `C` not covered
56
98
--> $DIR/doc-hidden-non-exhaustive.rs:38:11
57
99
|
58
-
LL | / enum InCrate {
59
-
LL | | A,
60
-
LL | | B,
61
-
LL | | #[doc(hidden)]
62
-
LL | | C,
63
-
| | - not covered
64
-
LL | | }
65
-
| |_- `InCrate` defined here
66
-
...
67
-
LL | match InCrate::A {
68
-
| ^^^^^^^^^^ pattern `C` not covered
100
+
LL | match InCrate::A {
101
+
| ^^^^^^^^^^ pattern `C` not covered
69
102
|
70
-
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
103
+
note: `InCrate` defined here
104
+
--> $DIR/doc-hidden-non-exhaustive.rs:11:5
105
+
|
106
+
LL | enum InCrate {
107
+
| -------
108
+
...
109
+
LL | C,
110
+
| ^ not covered
71
111
= note: the matched value is of type `InCrate`
112
+
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
= note: the matched value is of type `UnstableEnum`
21
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
22
|
23
-
LL ~ Foo::Stable => {}
23
+
LL ~ UnstableEnum::Stable => {}
24
24
LL + Stable2 | _ => todo!()
25
25
|
26
26
27
27
error[E0004]: non-exhaustive patterns: `_` not covered
28
28
--> $DIR/stable-gated-patterns.rs:13:11
29
29
|
30
-
LL | match Foo::Stable {
31
-
| ^^^^^^^^^^^ pattern `_` not covered
30
+
LL | match UnstableEnum::Stable {
31
+
| ^^^^^^^^^^^^^^^^^^^^ pattern `_` not covered
32
32
|
33
-
note: `Foo` defined here
33
+
note: `UnstableEnum` defined here
34
34
--> $DIR/auxiliary/unstable.rs:5:1
35
35
|
36
-
LL | / pub enum Foo {
36
+
LL | / pub enum UnstableEnum {
37
37
LL | | #[stable(feature = "stable_test_feature", since = "1.0.0")]
38
38
LL | | Stable,
39
39
LL | | #[stable(feature = "stable_test_feature", since = "1.0.0")]
40
40
... |
41
41
LL | | Unstable,
42
42
LL | | }
43
43
| |_^
44
-
= note: the matched value is of type `Foo`
44
+
= note: the matched value is of type `UnstableEnum`
45
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
0 commit comments