1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
struct Test; trait Trait1 { fn foo(); } trait Trait2 { fn foo(); } impl Trait1 for Test { fn foo() {} } impl Trait2 for Test { fn foo() {} } fn main() { Test::foo() //~ ERROR multiple applicable items in scope }