rust/tests/ui/exhaustive_items.stderr

29 lines
559 B
Plaintext
Raw Normal View History

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
|
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]
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