2022-05-05 14:12:52 +00:00
|
|
|
error: this seems like a manual implementation of the non-exhaustive pattern
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/manual_non_exhaustive_enum.rs:4:1
|
2022-05-05 14:12:52 +00:00
|
|
|
|
|
2024-09-04 21:22:28 +00:00
|
|
|
LL | / pub enum E {
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | |
|
2022-05-05 14:12:52 +00:00
|
|
|
LL | | A,
|
|
|
|
LL | | B,
|
|
|
|
LL | | #[doc(hidden)]
|
|
|
|
LL | | _C,
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
help: remove this variant
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/manual_non_exhaustive_enum.rs:9:5
|
2022-05-05 14:12:52 +00:00
|
|
|
|
|
|
|
|
LL | _C,
|
|
|
|
| ^^
|
2022-09-22 16:04:22 +00:00
|
|
|
= note: `-D clippy::manual-non-exhaustive` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::manual_non_exhaustive)]`
|
2024-09-04 21:22:28 +00:00
|
|
|
help: use the `#[non_exhaustive]` attribute instead
|
|
|
|
|
|
|
|
|
LL + #[non_exhaustive]
|
|
|
|
LL | pub enum E {
|
|
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
|
2023-12-01 17:21:58 +00:00
|
|
|
error: this seems like a manual implementation of the non-exhaustive pattern
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/manual_non_exhaustive_enum.rs:29:1
|
2023-12-01 17:21:58 +00:00
|
|
|
|
|
2024-09-04 21:22:28 +00:00
|
|
|
LL | / pub enum NoUnderscore {
|
2023-12-01 17:21:58 +00:00
|
|
|
LL | | A,
|
|
|
|
LL | | B,
|
|
|
|
LL | | #[doc(hidden)]
|
|
|
|
LL | | C,
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
help: remove this variant
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/manual_non_exhaustive_enum.rs:33:5
|
2023-12-01 17:21:58 +00:00
|
|
|
|
|
|
|
|
LL | C,
|
|
|
|
| ^
|
2024-09-04 21:22:28 +00:00
|
|
|
help: use the `#[non_exhaustive]` attribute instead
|
|
|
|
|
|
|
|
|
LL + #[non_exhaustive]
|
|
|
|
LL | pub enum NoUnderscore {
|
|
|
|
|
|
2023-12-01 17:21:58 +00:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
2022-05-05 14:12:52 +00:00
|
|
|
|