fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.4 KiB61 linesraw
1error: exported enums should not be exhaustive
2  --> $DIR/exhaustive_items.rs:9:5
3   |
4LL | /     pub enum Exhaustive {
5LL | |         Foo,
6LL | |         Bar,
7LL | |         Baz,
8LL | |         Quux(String),
9LL | |     }
10   | |_____^
11   |
12note: the lint level is defined here
13  --> $DIR/exhaustive_items.rs:1:9
14   |
15LL | #![deny(clippy::exhaustive_enums, clippy::exhaustive_structs)]
16   |         ^^^^^^^^^^^^^^^^^^^^^^^^
17help: try adding #[non_exhaustive]
18   |
19LL ~     #[non_exhaustive]
20LL ~     pub enum Exhaustive {
21   |
22
23error: exported enums should not be exhaustive
24  --> $DIR/exhaustive_items.rs:18:5
25   |
26LL | /     pub enum ExhaustiveWithAttrs {
27LL | |         Foo,
28LL | |         Bar,
29LL | |         Baz,
30LL | |         Quux(String),
31LL | |     }
32   | |_____^
33   |
34help: try adding #[non_exhaustive]
35   |
36LL ~     #[non_exhaustive]
37LL ~     pub enum ExhaustiveWithAttrs {
38   |
39
40error: exported structs should not be exhaustive
41  --> $DIR/exhaustive_items.rs:53:5
42   |
43LL | /     pub struct Exhaustive {
44LL | |         pub foo: u8,
45LL | |         pub bar: String,
46LL | |     }
47   | |_____^
48   |
49note: the lint level is defined here
50  --> $DIR/exhaustive_items.rs:1:35
51   |
52LL | #![deny(clippy::exhaustive_enums, clippy::exhaustive_structs)]
53   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
54help: try adding #[non_exhaustive]
55   |
56LL ~     #[non_exhaustive]
57LL ~     pub struct Exhaustive {
58   |
59
60error: aborting due to 3 previous errors
61