2021-01-30 17:06:34 +00:00
|
|
|
error: exported enums should not be exhaustive
|
|
|
|
--> $DIR/exhaustive_items.rs:11:5
|
|
|
|
|
|
|
|
|
LL | / pub enum Exhaustive {
|
|
|
|
LL | | Foo,
|
|
|
|
LL | | Bar,
|
|
|
|
LL | | Baz,
|
|
|
|
LL | | Quux(String),
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: the lint level is defined here
|
|
|
|
--> $DIR/exhaustive_items.rs:3:9
|
|
|
|
|
|
|
|
|
LL | #![deny(clippy::exhaustive_enums, clippy::exhaustive_structs)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
help: try adding #[non_exhaustive]
|
|
|
|
|
|
|
|
|
LL | #[non_exhaustive]
|
|
|
|
LL | pub enum Exhaustive {
|
|
|
|
|
|
|
|
|
|
|
|
|
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 {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: exported structs should not be exhaustive
|
|
|
|
--> $DIR/exhaustive_items.rs:55:5
|
|
|
|
|
|
|
|
|
LL | / pub struct Exhaustive {
|
2021-02-03 04:43:30 +00:00
|
|
|
LL | | pub foo: u8,
|
|
|
|
LL | | pub bar: String,
|
2021-01-30 17:06:34 +00:00
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: the lint level is defined here
|
|
|
|
--> $DIR/exhaustive_items.rs:3:35
|
|
|
|
|
|
|
|
|
LL | #![deny(clippy::exhaustive_enums, clippy::exhaustive_structs)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
help: try adding #[non_exhaustive]
|
|
|
|
|
|
|
|
|
LL | #[non_exhaustive]
|
|
|
|
LL | pub struct Exhaustive {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|