summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/default_trait_access.txt
blob: e69298969c8ed807f08c6023713ede2b5d5c4af2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
### What it does
Checks for literal calls to `Default::default()`.

### Why is this bad?
It's easier for the reader if the name of the type is used, rather than the
generic `Default`.

### Example
```
let s: String = Default::default();
```

Use instead:
```
let s = String::default();
```