1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
trait Sup { fn method(&self) {} } trait Trait: Sup { fn method(&self) {} } impl Sup for i32 {} impl Trait for i32 {} fn poly<T: Trait>(x: T) { x.method(); //~^ ERROR multiple applicable items in scope } fn concrete() { 1.method(); //~^ ERROR multiple applicable items in scope } fn main() {}