mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-24 03:53:20 +00:00
47 lines
1.1 KiB
Text
47 lines
1.1 KiB
Text
error: this seems like a manual implementation of the non-exhaustive pattern
|
|
--> tests/ui/manual_non_exhaustive_enum.rs:5:1
|
|
|
|
|
LL | enum E {
|
|
| ^-----
|
|
| |
|
|
| _help: add the attribute: `#[non_exhaustive] enum E`
|
|
| |
|
|
LL | |
|
|
LL | | A,
|
|
LL | | B,
|
|
LL | | #[doc(hidden)]
|
|
LL | | _C,
|
|
LL | | }
|
|
| |_^
|
|
|
|
|
help: remove this variant
|
|
--> tests/ui/manual_non_exhaustive_enum.rs:10:5
|
|
|
|
|
LL | _C,
|
|
| ^^
|
|
= note: `-D clippy::manual-non-exhaustive` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::manual_non_exhaustive)]`
|
|
|
|
error: this seems like a manual implementation of the non-exhaustive pattern
|
|
--> tests/ui/manual_non_exhaustive_enum.rs:30:1
|
|
|
|
|
LL | enum NoUnderscore {
|
|
| ^----------------
|
|
| |
|
|
| _help: add the attribute: `#[non_exhaustive] enum NoUnderscore`
|
|
| |
|
|
LL | | A,
|
|
LL | | B,
|
|
LL | | #[doc(hidden)]
|
|
LL | | C,
|
|
LL | | }
|
|
| |_^
|
|
|
|
|
help: remove this variant
|
|
--> tests/ui/manual_non_exhaustive_enum.rs:34:5
|
|
|
|
|
LL | C,
|
|
| ^
|
|
|
|
error: aborting due to 2 previous errors
|
|
|