blob: d1032a7a29aa04d68b3384edfc0dcc9dd4b310a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
### What it does
Warns on any exported `enum`s that are not tagged `#[non_exhaustive]`
### Why is this bad?
Exhaustive enums are typically fine, but a project which does
not wish to make a stability commitment around exported enums may wish to
disable them by default.
### Example
```
enum Foo {
Bar,
Baz
}
```
Use instead:
```
#[non_exhaustive]
enum Foo {
Bar,
Baz
}
```
|