@@ -49,6 +49,34 @@ LL | let NestedStruct { bar: NormalStruct { first_field, .. }, .. } = Nested
4949 = help: ensure that all fields are mentioned explicitly by adding the suggested fields
5050 = note: the pattern is of type `NestedStruct` and the `non_exhaustive_omitted_patterns` attribute was found
5151
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+
5280error: some variants are not matched explicitly
5381 --> $DIR/omitted-patterns.rs:58:9
5482 |
@@ -143,18 +171,18 @@ LL | #[deny(non_exhaustive_omitted_patterns)]
143171 = note: the matched value is of type `UnstableEnum` and the `non_exhaustive_omitted_patterns` attribute was found
144172
145173error: some variants are not matched explicitly
146- --> $DIR/omitted-patterns.rs:167 :9
174+ --> $DIR/omitted-patterns.rs:168 :9
147175 |
148176LL | _ => {}
149177 | ^ pattern `Unstable2` not covered
150178 |
151179note: the lint level is defined here
152- --> $DIR/omitted-patterns.rs:164 :12
180+ --> $DIR/omitted-patterns.rs:165 :12
153181 |
154182LL | #[deny(non_exhaustive_omitted_patterns)]
155183 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
156184 = help: ensure that all variants are matched explicitly by adding the suggested match arms
157185 = note: the matched value is of type `OnlyUnstableEnum` and the `non_exhaustive_omitted_patterns` attribute was found
158186
159- error: aborting due to 8 previous errors; 4 warnings emitted
187+ error: aborting due to 8 previous errors; 6 warnings emitted
160188
0 commit comments