summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/enum_glob_use.txt
blob: 3776822c35b0c21a9d6330c1b7a374c14cf8d232 (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
### What it does
Checks for `use Enum::*`.

### Why is this bad?
It is usually better style to use the prefixed name of
an enumeration variant, rather than importing variants.

### Known problems
Old-style enumerations that prefix the variants are
still around.

### Example
```
use std::cmp::Ordering::*;

foo(Less);
```

Use instead:
```
use std::cmp::Ordering;

foo(Ordering::Less)
```