summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/multiple_inherent_impl.txt
blob: 9d42286560cef8fa7bdc3f3c43c297a7f9c2e8fa (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
### What it does
Checks for multiple inherent implementations of a struct

### Why is this bad?
Splitting the implementation of a type makes the code harder to navigate.

### Example
```
struct X;
impl X {
    fn one() {}
}
impl X {
    fn other() {}
}
```

Could be written:

```
struct X;
impl X {
    fn one() {}
    fn other() {}
}
```