]> git.proxmox.com Git - rustc.git/blob - src/test/ui/pattern/usefulness/doc-hidden-non-exhaustive.stderr
New upstream version 1.61.0+dfsg1
[rustc.git] / src / test / ui / pattern / usefulness / doc-hidden-non-exhaustive.stderr
1 error[E0004]: non-exhaustive patterns: `_` not covered
2 --> $DIR/doc-hidden-non-exhaustive.rs:15:11
3 |
4 LL | match HiddenEnum::A {
5 | ^^^^^^^^^^^^^ pattern `_` not covered
6 |
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 | |_^
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 |
23
24 error[E0004]: non-exhaustive patterns: `B` not covered
25 --> $DIR/doc-hidden-non-exhaustive.rs:21:11
26 |
27 LL | match HiddenEnum::A {
28 | ^^^^^^^^^^^^^ pattern `B` not covered
29 |
30 note: `HiddenEnum` defined here
31 --> $DIR/auxiliary/hidden.rs:3:5
32 |
33 LL | / pub enum HiddenEnum {
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 `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 |
47
48 error[E0004]: non-exhaustive patterns: `B` and `_` not covered
49 --> $DIR/doc-hidden-non-exhaustive.rs:27:11
50 |
51 LL | match HiddenEnum::A {
52 | ^^^^^^^^^^^^^ patterns `B` and `_` not covered
53 |
54 note: `HiddenEnum` defined here
55 --> $DIR/auxiliary/hidden.rs:3:5
56 |
57 LL | / pub enum HiddenEnum {
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 `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 |
71
72 error[E0004]: non-exhaustive patterns: `Some(B)` and `Some(_)` not covered
73 --> $DIR/doc-hidden-non-exhaustive.rs:32:11
74 |
75 LL | match None {
76 | ^^^^ patterns `Some(B)` and `Some(_)` not covered
77 |
78 note: `Option<HiddenEnum>` defined here
79 --> $SRC_DIR/core/src/option.rs:LL:COL
80 |
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<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 |
96
97 error[E0004]: non-exhaustive patterns: `C` not covered
98 --> $DIR/doc-hidden-non-exhaustive.rs:38:11
99 |
100 LL | match InCrate::A {
101 | ^^^^^^^^^^ pattern `C` not covered
102 |
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
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
113 |
114 LL ~ InCrate::B => {}
115 LL + C => todo!()
116 |
117
118 error: aborting due to 5 previous errors
119
120 For more information about this error, try `rustc --explain E0004`.