2021-01-22 14:08:46 -06:00
|
|
|
error: exported enums should not be exhaustive
|
2021-01-21 15:41:57 -06:00
|
|
|
--> $DIR/exhaustive_items.rs:11:5
|
2021-01-21 14:48:30 -06:00
|
|
|
|
|
2021-01-21 15:41:57 -06:00
|
|
|
LL | / pub enum Exhaustive {
|
|
|
|
LL | | Foo,
|
|
|
|
LL | | Bar,
|
|
|
|
LL | | Baz,
|
|
|
|
LL | | Quux(String),
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
2021-01-21 14:48:30 -06:00
|
|
|
|
|
|
|
|
note: the lint level is defined here
|
2021-01-22 14:08:46 -06:00
|
|
|
--> $DIR/exhaustive_items.rs:3:9
|
2021-01-21 14:48:30 -06:00
|
|
|
|
|
2021-01-21 15:41:57 -06:00
|
|
|
LL | #![deny(clippy::exhaustive_enums, clippy::exhaustive_structs)]
|
2021-01-22 14:08:46 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-01-21 14:48:30 -06:00
|
|
|
help: try adding #[non_exhaustive]
|
|
|
|
|
|
2021-01-21 15:41:57 -06:00
|
|
|
LL | #[non_exhaustive]
|
2021-01-21 16:00:25 -06:00
|
|
|
LL | pub enum Exhaustive {
|
2021-01-22 14:08:46 -06:00
|
|
|
|
|
2021-01-21 14:48:30 -06:00
|
|
|
|
2021-01-25 16:39:03 -06:00
|
|
|
error: exported enums should not be exhaustive
|
|
|
|
--> $DIR/exhaustive_items.rs:20:5
|
|
|
|
|
|
|
|
|
LL | / pub enum ExhaustiveWithAttrs {
|
|
|
|
LL | | Foo,
|
|
|
|
LL | | Bar,
|
|
|
|
LL | | Baz,
|
|
|
|
LL | | Quux(String),
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
help: try adding #[non_exhaustive]
|
|
|
|
|
|
|
|
|
LL | #[non_exhaustive]
|
|
|
|
LL | pub enum ExhaustiveWithAttrs {
|
|
|
|
|
|
|
|
|
|
2021-01-22 14:08:46 -06:00
|
|
|
error: exported structs should not be exhaustive
|
2021-01-25 16:39:03 -06:00
|
|
|
--> $DIR/exhaustive_items.rs:55:5
|
2021-01-21 15:41:57 -06:00
|
|
|
|
|
|
|
|
LL | / pub struct Exhaustive {
|
|
|
|
LL | | foo: u8,
|
|
|
|
LL | | bar: String,
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
2021-01-22 14:08:46 -06:00
|
|
|
note: the lint level is defined here
|
|
|
|
--> $DIR/exhaustive_items.rs:3:35
|
|
|
|
|
|
|
|
|
LL | #![deny(clippy::exhaustive_enums, clippy::exhaustive_structs)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-01-21 15:41:57 -06:00
|
|
|
help: try adding #[non_exhaustive]
|
|
|
|
|
|
|
|
|
LL | #[non_exhaustive]
|
2021-01-21 16:00:25 -06:00
|
|
|
LL | pub struct Exhaustive {
|
2021-01-21 15:41:57 -06:00
|
|
|
|
|
|
|
|
|
2021-01-25 16:39:03 -06:00
|
|
|
error: aborting due to 3 previous errors
|
2021-01-21 14:48:30 -06:00
|
|
|
|