Update non-exhaustive omitted_patterns ui output
This commit is contained in:
parent
3344833a61
commit
4bf281a20c
2 changed files with 46 additions and 4 deletions
|
@ -49,6 +49,34 @@ LL | let NestedStruct { bar: NormalStruct { first_field, .. }, .. } = Nested
|
||||||
= help: ensure that all fields are mentioned explicitly by adding the suggested fields
|
= help: ensure that all fields are mentioned explicitly by adding the suggested fields
|
||||||
= note: the pattern is of type `NestedStruct` and the `non_exhaustive_omitted_patterns` attribute was found
|
= note: the pattern is of type `NestedStruct` and the `non_exhaustive_omitted_patterns` attribute was found
|
||||||
|
|
||||||
|
warning: some fields are not explicitly listed
|
||||||
|
--> $DIR/omitted-patterns.rs:173:9
|
||||||
|
|
|
||||||
|
LL | let OnlyUnstableStruct { unstable, .. } = OnlyUnstableStruct::new();
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `unstable2` not listed
|
||||||
|
|
|
||||||
|
note: the lint level is defined here
|
||||||
|
--> $DIR/omitted-patterns.rs:172:12
|
||||||
|
|
|
||||||
|
LL | #[warn(non_exhaustive_omitted_patterns)]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
= help: ensure that all fields are mentioned explicitly by adding the suggested fields
|
||||||
|
= note: the pattern is of type `OnlyUnstableStruct` and the `non_exhaustive_omitted_patterns` attribute was found
|
||||||
|
|
||||||
|
warning: some fields are not explicitly listed
|
||||||
|
--> $DIR/omitted-patterns.rs:181:9
|
||||||
|
|
|
||||||
|
LL | let UnstableStruct { stable, stable2, .. } = UnstableStruct::default();
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `unstable` not listed
|
||||||
|
|
|
||||||
|
note: the lint level is defined here
|
||||||
|
--> $DIR/omitted-patterns.rs:180:12
|
||||||
|
|
|
||||||
|
LL | #[warn(non_exhaustive_omitted_patterns)]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
= help: ensure that all fields are mentioned explicitly by adding the suggested fields
|
||||||
|
= note: the pattern is of type `UnstableStruct` and the `non_exhaustive_omitted_patterns` attribute was found
|
||||||
|
|
||||||
error: some variants are not matched explicitly
|
error: some variants are not matched explicitly
|
||||||
--> $DIR/omitted-patterns.rs:58:9
|
--> $DIR/omitted-patterns.rs:58:9
|
||||||
|
|
|
|
||||||
|
@ -143,18 +171,18 @@ LL | #[deny(non_exhaustive_omitted_patterns)]
|
||||||
= note: the matched value is of type `UnstableEnum` and the `non_exhaustive_omitted_patterns` attribute was found
|
= note: the matched value is of type `UnstableEnum` and the `non_exhaustive_omitted_patterns` attribute was found
|
||||||
|
|
||||||
error: some variants are not matched explicitly
|
error: some variants are not matched explicitly
|
||||||
--> $DIR/omitted-patterns.rs:167:9
|
--> $DIR/omitted-patterns.rs:168:9
|
||||||
|
|
|
|
||||||
LL | _ => {}
|
LL | _ => {}
|
||||||
| ^ pattern `Unstable2` not covered
|
| ^ pattern `Unstable2` not covered
|
||||||
|
|
|
|
||||||
note: the lint level is defined here
|
note: the lint level is defined here
|
||||||
--> $DIR/omitted-patterns.rs:164:12
|
--> $DIR/omitted-patterns.rs:165:12
|
||||||
|
|
|
|
||||||
LL | #[deny(non_exhaustive_omitted_patterns)]
|
LL | #[deny(non_exhaustive_omitted_patterns)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
= help: ensure that all variants are matched explicitly by adding the suggested match arms
|
= help: ensure that all variants are matched explicitly by adding the suggested match arms
|
||||||
= note: the matched value is of type `OnlyUnstableEnum` and the `non_exhaustive_omitted_patterns` attribute was found
|
= note: the matched value is of type `OnlyUnstableEnum` and the `non_exhaustive_omitted_patterns` attribute was found
|
||||||
|
|
||||||
error: aborting due to 8 previous errors; 4 warnings emitted
|
error: aborting due to 8 previous errors; 6 warnings emitted
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,17 @@
|
||||||
|
warning: some fields are not explicitly listed
|
||||||
|
--> $DIR/stable-omitted-patterns.rs:39:9
|
||||||
|
|
|
||||||
|
LL | let UnstableStruct { stable, .. } = UnstableStruct::default();
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `stable2` not listed
|
||||||
|
|
|
||||||
|
note: the lint level is defined here
|
||||||
|
--> $DIR/stable-omitted-patterns.rs:38:12
|
||||||
|
|
|
||||||
|
LL | #[warn(non_exhaustive_omitted_patterns)]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
= help: ensure that all fields are mentioned explicitly by adding the suggested fields
|
||||||
|
= note: the pattern is of type `UnstableStruct` and the `non_exhaustive_omitted_patterns` attribute was found
|
||||||
|
|
||||||
error: some variants are not matched explicitly
|
error: some variants are not matched explicitly
|
||||||
--> $DIR/stable-omitted-patterns.rs:23:9
|
--> $DIR/stable-omitted-patterns.rs:23:9
|
||||||
|
|
|
|
||||||
|
@ -12,5 +26,5 @@ LL | #[deny(non_exhaustive_omitted_patterns)]
|
||||||
= help: ensure that all variants are matched explicitly by adding the suggested match arms
|
= help: ensure that all variants are matched explicitly by adding the suggested match arms
|
||||||
= note: the matched value is of type `UnstableEnum` and the `non_exhaustive_omitted_patterns` attribute was found
|
= note: the matched value is of type `UnstableEnum` and the `non_exhaustive_omitted_patterns` attribute was found
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error; 1 warning emitted
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue