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
+20-62
Original file line number
Diff line number
Diff line change
@@ -1,73 +1,41 @@
1
1
error[E0004]: non-exhaustive patterns: `_` not covered
2
2
--> $DIR/doc-hidden-non-exhaustive.rs:8:11
3
3
|
4
-
LL | match Foo::A {
5
-
| ^^^^^^ pattern `_` not covered
6
-
|
7
-
note: `Foo` defined here
8
-
--> $DIR/auxiliary/hidden.rs:1:1
9
-
|
10
-
LL | / pub enum Foo {
11
-
LL | | A,
12
-
LL | | B,
13
-
LL | | #[doc(hidden)]
14
-
LL | | C,
15
-
LL | | }
16
-
| |_^
17
-
= note: the matched value is of type `Foo`
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 ~ Foo::B => {}
21
-
LL + _ => todo!()
4
+
LL | match HiddenEnum::A {
5
+
| ^^^^^^^^^^^^^ pattern `_` not covered
22
6
|
7
+
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
8
+
= note: the matched value is of type `HiddenEnum`
23
9
24
10
error[E0004]: non-exhaustive patterns: `B` not covered
25
11
--> $DIR/doc-hidden-non-exhaustive.rs:14:11
26
12
|
27
-
LL | match Foo::A {
28
-
| ^^^^^^ pattern `B` not covered
13
+
LL | match HiddenEnum::A {
14
+
| ^^^^^^^^^^^^^ pattern `B` not covered
29
15
|
30
16
note: `Foo` defined here
31
17
--> $DIR/auxiliary/hidden.rs:3:5
32
18
|
33
-
LL | / pub enum Foo {
34
-
LL | | A,
35
-
LL | | B,
36
-
| | ^ not covered
37
-
LL | | #[doc(hidden)]
38
-
LL | | C,
39
-
LL | | }
40
-
| |_-
41
-
= note: the matched value is of type `Foo`
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 ~ Foo::C => {}
45
-
LL + B => todo!()
19
+
LL | B,
20
+
| - not covered
46
21
|
22
+
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
23
+
= note: the matched value is of type `HiddenEnum`
47
24
48
25
error[E0004]: non-exhaustive patterns: `B` and `_` not covered
49
26
--> $DIR/doc-hidden-non-exhaustive.rs:20:11
50
27
|
51
-
LL | match Foo::A {
52
-
| ^^^^^^ patterns `B` and `_` not covered
28
+
LL | match HiddenEnum::A {
29
+
| ^^^^^^^^^^^^^ patterns `B` and `_` not covered
53
30
|
54
31
note: `Foo` defined here
55
32
--> $DIR/auxiliary/hidden.rs:3:5
56
33
|
57
-
LL | / pub enum Foo {
58
-
LL | | A,
59
-
LL | | B,
60
-
| | ^ not covered
61
-
LL | | #[doc(hidden)]
62
-
LL | | C,
63
-
LL | | }
64
-
| |_-
65
-
= note: the matched value is of type `Foo`
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 ~ Foo::A => {}
69
-
LL + B | _ => todo!()
34
+
LL | B,
35
+
| - not covered
70
36
|
37
+
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
38
+
= note: the matched value is of type `HiddenEnum`
71
39
72
40
error[E0004]: non-exhaustive patterns: `Some(B)` and `Some(_)` not covered
73
41
--> $DIR/doc-hidden-non-exhaustive.rs:25:11
@@ -78,21 +46,11 @@ LL | match None {
78
46
note: `Option<Foo>` defined here
79
47
--> $SRC_DIR/core/src/option.rs:LL:COL
80
48
|
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
-
| |_-
90
-
= note: the matched value is of type `Option<Foo>`
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(Foo::A) => {}
94
-
LL + Some(B) | Some(_) => todo!()
49
+
LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
50
+
| ---- not covered
95
51
|
52
+
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
53
+
= note: the matched value is of type `Option<HiddenEnum>`
0 commit comments