@@ -49,6 +49,34 @@ LL | let NestedStruct { bar: NormalStruct { first_field, .. }, .. } = Nested
49
49
= help: ensure that all fields are mentioned explicitly by adding the suggested fields
50
50
= note: the pattern is of type `NestedStruct` and the `non_exhaustive_omitted_patterns` attribute was found
51
51
52
+ warning: some fields are not explicitly listed
53
+ --> $DIR/omitted-patterns.rs:173:9
54
+ |
55
+ LL | let OnlyUnstableStruct { unstable, .. } = OnlyUnstableStruct::new();
56
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `unstable2` not listed
57
+ |
58
+ note: the lint level is defined here
59
+ --> $DIR/omitted-patterns.rs:172:12
60
+ |
61
+ LL | #[warn(non_exhaustive_omitted_patterns)]
62
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
63
+ = help: ensure that all fields are mentioned explicitly by adding the suggested fields
64
+ = note: the pattern is of type `OnlyUnstableStruct` and the `non_exhaustive_omitted_patterns` attribute was found
65
+
66
+ warning: some fields are not explicitly listed
67
+ --> $DIR/omitted-patterns.rs:181:9
68
+ |
69
+ LL | let UnstableStruct { stable, stable2, .. } = UnstableStruct::default();
70
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `unstable` not listed
71
+ |
72
+ note: the lint level is defined here
73
+ --> $DIR/omitted-patterns.rs:180:12
74
+ |
75
+ LL | #[warn(non_exhaustive_omitted_patterns)]
76
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
77
+ = help: ensure that all fields are mentioned explicitly by adding the suggested fields
78
+ = note: the pattern is of type `UnstableStruct` and the `non_exhaustive_omitted_patterns` attribute was found
79
+
52
80
error: some variants are not matched explicitly
53
81
--> $DIR/omitted-patterns.rs:58:9
54
82
|
@@ -143,18 +171,18 @@ LL | #[deny(non_exhaustive_omitted_patterns)]
143
171
= note: the matched value is of type `UnstableEnum` and the `non_exhaustive_omitted_patterns` attribute was found
144
172
145
173
error: some variants are not matched explicitly
146
- --> $DIR/omitted-patterns.rs:167 :9
174
+ --> $DIR/omitted-patterns.rs:168 :9
147
175
|
148
176
LL | _ => {}
149
177
| ^ pattern `Unstable2` not covered
150
178
|
151
179
note: the lint level is defined here
152
- --> $DIR/omitted-patterns.rs:164 :12
180
+ --> $DIR/omitted-patterns.rs:165 :12
153
181
|
154
182
LL | #[deny(non_exhaustive_omitted_patterns)]
155
183
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
156
184
= help: ensure that all variants are matched explicitly by adding the suggested match arms
157
185
= note: the matched value is of type `OnlyUnstableEnum` and the `non_exhaustive_omitted_patterns` attribute was found
158
186
159
- error: aborting due to 8 previous errors; 4 warnings emitted
187
+ error: aborting due to 8 previous errors; 6 warnings emitted
160
188
0 commit comments