fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
9.5 KiB217 linesraw
1warning: some fields are not explicitly listed
2  --> $DIR/omitted-patterns.rs:102:9
3   |
4LL |         VariantNonExhaustive::Bar { x, .. } => {}
5   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `y` not listed
6   |
7   = help: ensure that all fields are mentioned explicitly by adding the suggested fields
8   = note: the pattern is of type `VariantNonExhaustive` and the `non_exhaustive_omitted_patterns` attribute was found
9note: the lint level is defined here
10  --> $DIR/omitted-patterns.rs:99:12
11   |
12LL |     #[warn(non_exhaustive_omitted_patterns)]
13   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14
15warning: some fields are not explicitly listed
16  --> $DIR/omitted-patterns.rs:107:9
17   |
18LL |     let FunctionalRecord { first_field, second_field, .. } = FunctionalRecord::default();
19   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `third_field` not listed
20   |
21   = help: ensure that all fields are mentioned explicitly by adding the suggested fields
22   = note: the pattern is of type `FunctionalRecord` and the `non_exhaustive_omitted_patterns` attribute was found
23note: the lint level is defined here
24  --> $DIR/omitted-patterns.rs:106:12
25   |
26LL |     #[warn(non_exhaustive_omitted_patterns)]
27   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28
29warning: some fields are not explicitly listed
30  --> $DIR/omitted-patterns.rs:115:29
31   |
32LL |     let NestedStruct { bar: NormalStruct { first_field, .. }, .. } = NestedStruct::default();
33   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `second_field` not listed
34   |
35   = help: ensure that all fields are mentioned explicitly by adding the suggested fields
36   = note: the pattern is of type `NormalStruct` and the `non_exhaustive_omitted_patterns` attribute was found
37note: the lint level is defined here
38  --> $DIR/omitted-patterns.rs:114:12
39   |
40LL |     #[warn(non_exhaustive_omitted_patterns)]
41   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42
43warning: some fields are not explicitly listed
44  --> $DIR/omitted-patterns.rs:115:9
45   |
46LL |     let NestedStruct { bar: NormalStruct { first_field, .. }, .. } = NestedStruct::default();
47   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `foo` not listed
48   |
49   = help: ensure that all fields are mentioned explicitly by adding the suggested fields
50   = note: the pattern is of type `NestedStruct` and the `non_exhaustive_omitted_patterns` attribute was found
51
52warning: some fields are not explicitly listed
53  --> $DIR/omitted-patterns.rs:173:9
54   |
55LL |     let OnlyUnstableStruct { unstable, .. } = OnlyUnstableStruct::new();
56   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `unstable2` not listed
57   |
58   = help: ensure that all fields are mentioned explicitly by adding the suggested fields
59   = note: the pattern is of type `OnlyUnstableStruct` and the `non_exhaustive_omitted_patterns` attribute was found
60note: the lint level is defined here
61  --> $DIR/omitted-patterns.rs:172:12
62   |
63LL |     #[warn(non_exhaustive_omitted_patterns)]
64   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
65
66warning: some fields are not explicitly listed
67  --> $DIR/omitted-patterns.rs:181:9
68   |
69LL |     let UnstableStruct { stable, stable2, .. } = UnstableStruct::default();
70   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `unstable` not listed
71   |
72   = help: ensure that all fields are mentioned explicitly by adding the suggested fields
73   = note: the pattern is of type `UnstableStruct` and the `non_exhaustive_omitted_patterns` attribute was found
74note: the lint level is defined here
75  --> $DIR/omitted-patterns.rs:180:12
76   |
77LL |     #[warn(non_exhaustive_omitted_patterns)]
78   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
79
80error: some variants are not matched explicitly
81  --> $DIR/omitted-patterns.rs:58:9
82   |
83LL |         _ => {}
84   |         ^ pattern `NonExhaustiveEnum::Struct { .. }` not covered
85   |
86   = help: ensure that all variants are matched explicitly by adding the suggested match arms
87   = note: the matched value is of type `NonExhaustiveEnum` and the `non_exhaustive_omitted_patterns` attribute was found
88note: the lint level is defined here
89  --> $DIR/omitted-patterns.rs:57:16
90   |
91LL |         #[deny(non_exhaustive_omitted_patterns)]
92   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
93
94error: some variants are not matched explicitly
95  --> $DIR/omitted-patterns.rs:65:9
96   |
97LL |         _ => {}
98   |         ^ pattern `NonExhaustiveEnum::Tuple(_)` not covered
99   |
100   = help: ensure that all variants are matched explicitly by adding the suggested match arms
101   = note: the matched value is of type `NonExhaustiveEnum` and the `non_exhaustive_omitted_patterns` attribute was found
102note: the lint level is defined here
103  --> $DIR/omitted-patterns.rs:64:16
104   |
105LL |         #[deny(non_exhaustive_omitted_patterns)]
106   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
107
108error: some variants are not matched explicitly
109  --> $DIR/omitted-patterns.rs:75:9
110   |
111LL |         _ => {}
112   |         ^ pattern `NonExhaustiveEnum::Unit` not covered
113   |
114   = help: ensure that all variants are matched explicitly by adding the suggested match arms
115   = note: the matched value is of type `NonExhaustiveEnum` and the `non_exhaustive_omitted_patterns` attribute was found
116note: the lint level is defined here
117  --> $DIR/omitted-patterns.rs:74:16
118   |
119LL |         #[deny(non_exhaustive_omitted_patterns)]
120   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
121
122error: some variants are not matched explicitly
123  --> $DIR/omitted-patterns.rs:92:32
124   |
125LL |         NestedNonExhaustive::A(_) => {}
126   |                                ^ patterns `NonExhaustiveEnum::Tuple(_)` and `NonExhaustiveEnum::Struct { .. }` not covered
127   |
128   = help: ensure that all variants are matched explicitly by adding the suggested match arms
129   = note: the matched value is of type `NonExhaustiveEnum` and the `non_exhaustive_omitted_patterns` attribute was found
130note: the lint level is defined here
131  --> $DIR/omitted-patterns.rs:89:12
132   |
133LL |     #[deny(non_exhaustive_omitted_patterns)]
134   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
135
136error: some variants are not matched explicitly
137  --> $DIR/omitted-patterns.rs:94:9
138   |
139LL |         _ => {}
140   |         ^ pattern `NestedNonExhaustive::C` not covered
141   |
142   = help: ensure that all variants are matched explicitly by adding the suggested match arms
143   = note: the matched value is of type `NestedNonExhaustive` and the `non_exhaustive_omitted_patterns` attribute was found
144
145error: some variants are not matched explicitly
146  --> $DIR/omitted-patterns.rs:132:9
147   |
148LL |         _ => {}
149   |         ^ pattern `NonExhaustiveSingleVariant::A(_)` not covered
150   |
151   = help: ensure that all variants are matched explicitly by adding the suggested match arms
152   = note: the matched value is of type `NonExhaustiveSingleVariant` and the `non_exhaustive_omitted_patterns` attribute was found
153note: the lint level is defined here
154  --> $DIR/omitted-patterns.rs:130:12
155   |
156LL |     #[deny(non_exhaustive_omitted_patterns)]
157   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
158
159error: some variants are not matched explicitly
160  --> $DIR/omitted-patterns.rs:144:9
161   |
162LL |         _ => {}
163   |         ^ pattern `UnstableEnum::Unstable` not covered
164   |
165   = help: ensure that all variants are matched explicitly by adding the suggested match arms
166   = note: the matched value is of type `UnstableEnum` and the `non_exhaustive_omitted_patterns` attribute was found
167note: the lint level is defined here
168  --> $DIR/omitted-patterns.rs:143:16
169   |
170LL |         #[deny(non_exhaustive_omitted_patterns)]
171   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
172
173error: some variants are not matched explicitly
174  --> $DIR/omitted-patterns.rs:168:9
175   |
176LL |         _ => {}
177   |         ^ pattern `OnlyUnstableEnum::Unstable2` not covered
178   |
179   = help: ensure that all variants are matched explicitly by adding the suggested match arms
180   = note: the matched value is of type `OnlyUnstableEnum` and the `non_exhaustive_omitted_patterns` attribute was found
181note: the lint level is defined here
182  --> $DIR/omitted-patterns.rs:165:12
183   |
184LL |     #[deny(non_exhaustive_omitted_patterns)]
185   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
186
187error[E0005]: refutable pattern in local binding
188  --> $DIR/omitted-patterns.rs:194:9
189   |
190LL |     let local_refutable @ NonExhaustiveEnum::Unit = NonExhaustiveEnum::Unit;
191   |         ^^^^^^^^^^^^^^^ pattern `_` not covered
192   |
193   = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
194   = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
195   = note: the matched value is of type `NonExhaustiveEnum`
196help: you might want to use `let else` to handle the variant that isn't matched
197   |
198LL |     let local_refutable @ NonExhaustiveEnum::Unit = NonExhaustiveEnum::Unit else { todo!() };
199   |                                                                             ++++++++++++++++
200
201error: some variants are not matched explicitly
202  --> $DIR/omitted-patterns.rs:202:9
203   |
204LL |         _ => {}
205   |         ^ pattern `NonExhaustiveEnum::Struct { .. }` not covered
206   |
207   = help: ensure that all variants are matched explicitly by adding the suggested match arms
208   = note: the matched value is of type `NonExhaustiveEnum` and the `non_exhaustive_omitted_patterns` attribute was found
209note: the lint level is defined here
210  --> $DIR/omitted-patterns.rs:198:12
211   |
212LL |     #[deny(non_exhaustive_omitted_patterns)]
213   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
214
215error: aborting due to 10 previous errors; 6 warnings emitted
216
217For more information about this error, try `rustc --explain E0005`.