summaryrefslogtreecommitdiffstats
path: root/tests/ui/methods/disambiguate-multiple-trait-2.stderr
blob: 2778f254a5619d572dc4cc0c1171392251ae675a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
error[E0221]: ambiguous associated type `Type` in bounds of `T`
  --> $DIR/disambiguate-multiple-trait-2.rs:23:12
   |
LL |     type Type;
   |     --------- ambiguous `Type` from `A`
...
LL |     type Type;
   |     --------- ambiguous `Type` from `B`
...
LL |     let _: T::Type;
   |            ^^^^^^^ ambiguous associated type `Type`
   |
help: use fully-qualified syntax to disambiguate
   |
LL |     let _: <T as A>::Type;
   |            ~~~~~~~~~~
help: use fully-qualified syntax to disambiguate
   |
LL |     let _: <T as B>::Type;
   |            ~~~~~~~~~~

error[E0034]: multiple applicable items in scope
  --> $DIR/disambiguate-multiple-trait-2.rs:16:7
   |
LL |     t.foo();
   |       ^^^ multiple `foo` found
   |
note: candidate #1 is defined in the trait `A`
  --> $DIR/disambiguate-multiple-trait-2.rs:4:5
   |
LL |     fn foo(&self);
   |     ^^^^^^^^^^^^^^
note: candidate #2 is defined in the trait `B`
  --> $DIR/disambiguate-multiple-trait-2.rs:10:5
   |
LL |     fn foo(&self);
   |     ^^^^^^^^^^^^^^
help: disambiguate the method for candidate #1
   |
LL |     A::foo(&t);
   |     ~~~~~~~~~~
help: disambiguate the method for candidate #2
   |
LL |     B::foo(&t);
   |     ~~~~~~~~~~

error[E0034]: multiple applicable items in scope
  --> $DIR/disambiguate-multiple-trait-2.rs:20:16
   |
LL |     let _ = T::CONST;
   |                ^^^^^ multiple `CONST` found
   |
note: candidate #1 is defined in the trait `A`
  --> $DIR/disambiguate-multiple-trait-2.rs:3:5
   |
LL |     const CONST: usize = 1;
   |     ^^^^^^^^^^^^^^^^^^
note: candidate #2 is defined in the trait `B`
  --> $DIR/disambiguate-multiple-trait-2.rs:9:5
   |
LL |     const CONST: usize;
   |     ^^^^^^^^^^^^^^^^^^
help: use fully-qualified syntax to disambiguate
   |
LL |     let _ = <T as A>::CONST;
   |             ~~~~~~~~~~
LL |     let _ = <T as B>::CONST;
   |             ~~~~~~~~~~

error[E0223]: ambiguous associated type
  --> $DIR/disambiguate-multiple-trait-2.rs:52:12
   |
LL |     let _: S::Type;
   |            ^^^^^^^
   |
help: use fully-qualified syntax
   |
LL |     let _: <S as A>::Type;
   |            ~~~~~~~~~~~~~~
LL |     let _: <S as B>::Type;
   |            ~~~~~~~~~~~~~~

error[E0034]: multiple applicable items in scope
  --> $DIR/disambiguate-multiple-trait-2.rs:46:8
   |
LL |     S::foo(&s);
   |        ^^^ multiple `foo` found
   |
note: candidate #1 is defined in an impl of the trait `A` for the type `T`
  --> $DIR/disambiguate-multiple-trait-2.rs:35:5
   |
LL |     fn foo(&self) {}
   |     ^^^^^^^^^^^^^
note: candidate #2 is defined in an impl of the trait `B` for the type `T`
  --> $DIR/disambiguate-multiple-trait-2.rs:41:5
   |
LL |     fn foo(&self) {}
   |     ^^^^^^^^^^^^^
help: use fully-qualified syntax to disambiguate
   |
LL |     A::foo(&s);
   |     ~~~
LL |     B::foo(&s);
   |     ~~~

error[E0034]: multiple applicable items in scope
  --> $DIR/disambiguate-multiple-trait-2.rs:49:16
   |
LL |     let _ = S::CONST;
   |                ^^^^^ multiple `CONST` found
   |
note: candidate #1 is defined in an impl of the trait `A` for the type `T`
  --> $DIR/disambiguate-multiple-trait-2.rs:34:5
   |
LL |     const CONST: usize = 1;
   |     ^^^^^^^^^^^^^^^^^^
note: candidate #2 is defined in an impl of the trait `B` for the type `T`
  --> $DIR/disambiguate-multiple-trait-2.rs:40:5
   |
LL |     const CONST: usize = 1;
   |     ^^^^^^^^^^^^^^^^^^
help: use fully-qualified syntax to disambiguate
   |
LL |     let _ = <S as A>::CONST;
   |             ~~~~~~~~~~
LL |     let _ = <S as B>::CONST;
   |             ~~~~~~~~~~

error: aborting due to 6 previous errors

Some errors have detailed explanations: E0034, E0221, E0223.
For more information about an error, try `rustc --explain E0034`.