rust/src/docs/same_name_method.txt
2022-09-09 13:36:26 +02:00

23 lines
No EOL
285 B
Text

### 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) {}
}
```