about summary refs log tree commit diff
path: root/src/docs/same_name_method.txt
blob: 792dd717fc6450cdf836fa5f560bd1c34a85270e (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
It lints if a struct has two methods with the same name:
one from a trait, another not from trait.

### Why is this bad?
Confusing.

### Example
```
trait T {
    fn foo(&self) {}
}

struct S;

impl T for S {
    fn foo(&self) {}
}

impl S {
    fn foo(&self) {}
}
```