summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/type_repetition_in_bounds.txt
blob: 18ed372fd13e374d907980b097407c8c1b5789a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
### What it does
This lint warns about unnecessary type repetitions in trait bounds

### Why is this bad?
Repeating the type for every bound makes the code
less readable than combining the bounds

### Example
```
pub fn foo<T>(t: T) where T: Copy, T: Clone {}
```

Use instead:
```
pub fn foo<T>(t: T) where T: Copy + Clone {}
```