1+ error[E0223]: ambiguous associated type
2+ --> $DIR/disambiguate-multiple-impl.rs:33:12
3+ |
4+ LL | let _: S::Type = ();
5+ | ^^^^^^^
6+ |
7+ help: use the fully-qualified path
8+ |
9+ LL | let _: <S as A>::Type = ();
10+ | ~~~~~~~~~~~~~~
11+ LL | let _: <S as B>::Type = ();
12+ | ~~~~~~~~~~~~~~
13+
114error[E0034]: multiple applicable items in scope
2- --> $DIR/disambiguate-multiple-impl.rs:21 :8
15+ --> $DIR/disambiguate-multiple-impl.rs:29 :8
316 |
417LL | S::foo(&s);
518 | ^^^ multiple `foo` found
619 |
720note: candidate #1 is defined in an impl of the trait `A` for the type `S`
8- --> $DIR/disambiguate-multiple-impl.rs:12 :5
21+ --> $DIR/disambiguate-multiple-impl.rs:18 :5
922 |
1023LL | fn foo(&self) {}
1124 | ^^^^^^^^^^^^^
1225note: candidate #2 is defined in an impl of the trait `B` for the type `S`
13- --> $DIR/disambiguate-multiple-impl.rs:16 :5
26+ --> $DIR/disambiguate-multiple-impl.rs:24 :5
1427 |
1528LL | fn foo(&self) {}
1629 | ^^^^^^^^^^^^^
@@ -23,6 +36,32 @@ help: disambiguate the method for candidate #2
2336LL | <S as B>::foo(&s);
2437 | ~~~~~~~~~~
2538
26- error: aborting due to previous error
39+ error[E0034]: multiple applicable items in scope
40+ --> $DIR/disambiguate-multiple-impl.rs:35:16
41+ |
42+ LL | let _ = S::CONST;
43+ | ^^^^^ multiple `CONST` found
44+ |
45+ note: candidate #1 is defined in an impl of the trait `A` for the type `S`
46+ --> $DIR/disambiguate-multiple-impl.rs:17:5
47+ |
48+ LL | const CONST: usize = 1;
49+ | ^^^^^^^^^^^^^^^^^^
50+ note: candidate #2 is defined in an impl of the trait `B` for the type `S`
51+ --> $DIR/disambiguate-multiple-impl.rs:23:5
52+ |
53+ LL | const CONST: usize = 2;
54+ | ^^^^^^^^^^^^^^^^^^
55+ help: disambiguate the associated constant for candidate #1
56+ |
57+ LL | let _ = <S as A>::CONST;
58+ | ~~~~~~~~~~
59+ help: disambiguate the associated constant for candidate #2
60+ |
61+ LL | let _ = <S as B>::CONST;
62+ | ~~~~~~~~~~
63+
64+ error: aborting due to 3 previous errors
2765
28- For more information about this error, try `rustc --explain E0034`.
66+ Some errors have detailed explanations: E0034, E0223.
67+ For more information about an error, try `rustc --explain E0034`.
0 commit comments