2021-01-21 14:48:30 -06:00
|
|
|
error: enums should not be exhaustive
|
2021-01-21 15:36:18 -06:00
|
|
|
--> $DIR/exhaustive_items.rs:10:1
|
2021-01-21 14:48:30 -06:00
|
|
|
|
|
2021-01-21 15:34:44 -06:00
|
|
|
LL | / pub enum Exhaustive {
|
2021-01-21 14:48:30 -06:00
|
|
|
LL | | Foo,
|
|
|
|
LL | | Bar,
|
|
|
|
LL | | Baz,
|
|
|
|
LL | | Quux(String),
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
note: the lint level is defined here
|
2021-01-21 15:36:18 -06:00
|
|
|
--> $DIR/exhaustive_items.rs:3:9
|
2021-01-21 14:48:30 -06:00
|
|
|
|
|
|
|
|
LL | #![deny(clippy::exhaustive_enums)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
help: try adding #[non_exhaustive]
|
|
|
|
|
|
|
|
|
LL | #[non_exhaustive]
|
2021-01-21 15:34:44 -06:00
|
|
|
LL | pub enum Exhaustive {
|
2021-01-21 14:48:30 -06:00
|
|
|
LL | Foo,
|
|
|
|
LL | Bar,
|
|
|
|
LL | Baz,
|
|
|
|
LL | Quux(String),
|
|
|
|
...
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|