mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-26 14:40:32 +00:00
49 lines
1.1 KiB
Text
49 lines
1.1 KiB
Text
error: this seems like a manual implementation of the non-exhaustive pattern
|
|
--> tests/ui/manual_non_exhaustive_enum.rs:4:1
|
|
|
|
|
LL | / pub enum E {
|
|
LL | |
|
|
LL | | A,
|
|
LL | | B,
|
|
LL | | #[doc(hidden)]
|
|
LL | | _C,
|
|
LL | | }
|
|
| |_^
|
|
|
|
|
help: remove this variant
|
|
--> tests/ui/manual_non_exhaustive_enum.rs:9:5
|
|
|
|
|
LL | _C,
|
|
| ^^
|
|
= note: `-D clippy::manual-non-exhaustive` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::manual_non_exhaustive)]`
|
|
help: use the `#[non_exhaustive]` attribute instead
|
|
|
|
|
LL + #[non_exhaustive]
|
|
LL | pub enum E {
|
|
|
|
|
|
|
error: this seems like a manual implementation of the non-exhaustive pattern
|
|
--> tests/ui/manual_non_exhaustive_enum.rs:29:1
|
|
|
|
|
LL | / pub enum NoUnderscore {
|
|
LL | | A,
|
|
LL | | B,
|
|
LL | | #[doc(hidden)]
|
|
LL | | C,
|
|
LL | | }
|
|
| |_^
|
|
|
|
|
help: remove this variant
|
|
--> tests/ui/manual_non_exhaustive_enum.rs:33:5
|
|
|
|
|
LL | C,
|
|
| ^
|
|
help: use the `#[non_exhaustive]` attribute instead
|
|
|
|
|
LL + #[non_exhaustive]
|
|
LL | pub enum NoUnderscore {
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|