]>
Commit | Line | Data |
---|---|---|
8bb4bdeb XL |
1 | // Test that name clashes between the method in an impl for the type |
2 | // and the method in the trait when both are in the same scope. | |
3 | ||
4 | trait T { | |
5 | fn foo(&self); | |
6 | } | |
7 | ||
dc9dc135 | 8 | impl<'a> dyn T + 'a { |
8bb4bdeb XL |
9 | fn foo(&self) {} |
10 | } | |
11 | ||
12 | impl T for i32 { | |
13 | fn foo(&self) {} | |
a7813a04 XL |
14 | } |
15 | ||
16 | fn main() { | |
dc9dc135 | 17 | let x: &dyn T = &0i32; |
8bb4bdeb | 18 | x.foo(); //~ ERROR multiple applicable items in scope [E0034] |
54a0048b | 19 | } |