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