summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/exhaustive_items.stderr
blob: ae43e81c0d31f75293fb7677c585610c44440d7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
error: exported enums should not be exhaustive
  --> $DIR/exhaustive_items.rs:9: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:1: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:18: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:53:5
   |
LL | /     pub struct Exhaustive {
LL | |         pub foo: u8,
LL | |         pub bar: String,
LL | |     }
   | |_____^
   |
note: the lint level is defined here
  --> $DIR/exhaustive_items.rs:1: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