]> git.lizzy.rs Git - rust.git/blob - src/docs/same_name_method.txt
Merge remote-tracking branch 'upstream/master' into rustup
[rust.git] / src / docs / same_name_method.txt
1 ### What it does
2 It lints if a struct has two methods with the same name:
3 one from a trait, another not from trait.
4
5 ### Why is this bad?
6 Confusing.
7
8 ### Example
9 ```
10 trait T {
11     fn foo(&self) {}
12 }
13
14 struct S;
15
16 impl T for S {
17     fn foo(&self) {}
18 }
19
20 impl S {
21     fn foo(&self) {}
22 }
23 ```