2021-01-30 17:06:34 +00:00
|
|
|
error: exported enums should not be exhaustive
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/exhaustive_items.rs:9:5
|
2021-01-30 17:06:34 +00:00
|
|
|
|
|
|
|
|
LL | / pub enum Exhaustive {
|
|
|
|
LL | | Foo,
|
|
|
|
LL | | Bar,
|
|
|
|
LL | | Baz,
|
|
|
|
LL | | Quux(String),
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
note: the lint level is defined here
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/exhaustive_items.rs:1:9
|
2021-01-30 17:06:34 +00:00
|
|
|
|
|
|
|
|
LL | #![deny(clippy::exhaustive_enums, clippy::exhaustive_structs)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
help: try adding #[non_exhaustive]
|
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL ~ #[non_exhaustive]
|
|
|
|
LL ~ pub enum Exhaustive {
|
2021-01-30 17:06:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
error: exported enums should not be exhaustive
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/exhaustive_items.rs:18:5
|
2021-01-30 17:06:34 +00:00
|
|
|
|
|
|
|
|
LL | / pub enum ExhaustiveWithAttrs {
|
|
|
|
LL | | Foo,
|
|
|
|
LL | | Bar,
|
|
|
|
LL | | Baz,
|
|
|
|
LL | | Quux(String),
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
help: try adding #[non_exhaustive]
|
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL ~ #[non_exhaustive]
|
|
|
|
LL ~ pub enum ExhaustiveWithAttrs {
|
2021-01-30 17:06:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
error: exported structs should not be exhaustive
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/exhaustive_items.rs:53:5
|
2021-01-30 17:06:34 +00:00
|
|
|
|
|
|
|
|
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
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/exhaustive_items.rs:1:35
|
2021-01-30 17:06:34 +00:00
|
|
|
|
|
|
|
|
LL | #![deny(clippy::exhaustive_enums, clippy::exhaustive_structs)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
help: try adding #[non_exhaustive]
|
|
|
|
|
|
2021-08-11 14:21:33 +00:00
|
|
|
LL ~ #[non_exhaustive]
|
|
|
|
LL ~ pub struct Exhaustive {
|
2021-01-30 17:06:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|