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
+
1
14
error[E0034]: multiple applicable items in scope
2
- --> $DIR/disambiguate-multiple-impl.rs:21 :8
15
+ --> $DIR/disambiguate-multiple-impl.rs:29 :8
3
16
|
4
17
LL | S::foo(&s);
5
18
| ^^^ multiple `foo` found
6
19
|
7
20
note: 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
9
22
|
10
23
LL | fn foo(&self) {}
11
24
| ^^^^^^^^^^^^^
12
25
note: 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
14
27
|
15
28
LL | fn foo(&self) {}
16
29
| ^^^^^^^^^^^^^
@@ -23,6 +36,32 @@ help: disambiguate the method for candidate #2
23
36
LL | <S as B>::foo(&s);
24
37
| ~~~~~~~~~~
25
38
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
27
65
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