"##,
E0034: r##"
-The compiler doesn't know what method to call because more than one does
-have the same prototype. Example:
+The compiler doesn't know what method to call because more than one method
+has the same prototype. Example:
```
struct Test;
impl Trait2 for Test { fn foo() {} }
fn main() {
- Test::foo() // error, what foo() to call?
+ Test::foo() // error, which foo() to call?
}
```
Test::foo() // and now that's good!
}
```
+
+However, a better solution would be using fully explicit naming of type and
+trait:
+
+```
+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 as Trait1>::foo()
+}
+```
"##,
E0035: r##"