2023-10-23 11:27:33 -05:00
|
|
|
error: some variants are not matched explicitly
|
|
|
|
--> $DIR/omitted-patterns-dont-lint-on-arm.rs:15:11
|
|
|
|
|
|
|
|
|
LL | match val {
|
|
|
|
| ^^^ pattern `NonExhaustiveEnum::Struct { .. }` not covered
|
|
|
|
|
|
|
|
|
= help: ensure that all variants are matched explicitly by adding the suggested match arms
|
|
|
|
= note: the matched value is of type `NonExhaustiveEnum` and the `non_exhaustive_omitted_patterns` attribute was found
|
|
|
|
note: the lint level is defined here
|
|
|
|
--> $DIR/omitted-patterns-dont-lint-on-arm.rs:14:12
|
|
|
|
|
|
|
|
|
LL | #[deny(non_exhaustive_omitted_patterns)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2023-11-02 00:21:08 -05:00
|
|
|
warning: the lint level must be set on the whole match
|
2023-10-23 11:55:04 -05:00
|
|
|
--> $DIR/omitted-patterns-dont-lint-on-arm.rs:34:9
|
|
|
|
|
|
2023-11-02 00:21:08 -05:00
|
|
|
LL | #[deny(non_exhaustive_omitted_patterns)]
|
|
|
|
| ------------------------------- remove this attribute
|
2023-10-23 11:55:04 -05:00
|
|
|
LL | _ => {}
|
|
|
|
| ^
|
|
|
|
|
|
2023-11-02 00:21:08 -05:00
|
|
|
= help: it no longer has any effect to set the lint level on an individual match arm
|
|
|
|
help: set the lint level on the whole match
|
|
|
|
|
|
|
|
|
LL + #[deny(non_exhaustive_omitted_patterns)]
|
|
|
|
LL | match val {
|
2023-10-23 11:55:04 -05:00
|
|
|
|
|
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error; 1 warning emitted
|
2023-10-23 11:27:33 -05:00
|
|
|
|