1
1
error[E0271]: type mismatch resolving `<A as Trait>::Associated == ()`
2
- --> $DIR/issue-87261.rs:56:5
2
+ --> $DIR/issue-87261.rs:56:19
3
3
|
4
4
LL | accepts_trait(a);
5
- | ^^^^^^^^^^^^^ expected `()`, found associated type
5
+ | ------------- ^ expected `()`, found associated type
6
+ | |
7
+ | required by a bound introduced by this call
6
8
|
7
9
= note: expected unit type `()`
8
10
found associated type `<A as Trait>::Associated`
@@ -17,10 +19,12 @@ LL | A: Trait<Associated = ()> + 'static,
17
19
| +++++++++++++++++
18
20
19
21
error[E0271]: type mismatch resolving `<B as Trait>::Associated == ()`
20
- --> $DIR/issue-87261.rs:59:5
22
+ --> $DIR/issue-87261.rs:59:19
21
23
|
22
24
LL | accepts_trait(b);
23
- | ^^^^^^^^^^^^^ expected `()`, found associated type
25
+ | ------------- ^ expected `()`, found associated type
26
+ | |
27
+ | required by a bound introduced by this call
24
28
|
25
29
= note: expected unit type `()`
26
30
found associated type `<B as Trait>::Associated`
@@ -33,10 +37,12 @@ LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
33
37
| ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait`
34
38
35
39
error[E0271]: type mismatch resolving `<C as Trait>::Associated == ()`
36
- --> $DIR/issue-87261.rs:62:5
40
+ --> $DIR/issue-87261.rs:62:19
37
41
|
38
42
LL | accepts_trait(c);
39
- | ^^^^^^^^^^^^^ expected `()`, found associated type
43
+ | ------------- ^ expected `()`, found associated type
44
+ | |
45
+ | required by a bound introduced by this call
40
46
|
41
47
= note: expected unit type `()`
42
48
found associated type `<C as Trait>::Associated`
@@ -51,10 +57,12 @@ LL | C: Trait<Associated = ()> + Foo,
51
57
| +++++++++++++++++
52
58
53
59
error[E0271]: type mismatch resolving `<D as Trait>::Associated == ()`
54
- --> $DIR/issue-87261.rs:65:5
60
+ --> $DIR/issue-87261.rs:65:19
55
61
|
56
62
LL | accepts_trait(d);
57
- | ^^^^^^^^^^^^^ expected `()`, found associated type
63
+ | ------------- ^ expected `()`, found associated type
64
+ | |
65
+ | required by a bound introduced by this call
58
66
|
59
67
= note: expected unit type `()`
60
68
found associated type `<D as Trait>::Associated`
@@ -67,10 +75,12 @@ LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
67
75
| ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait`
68
76
69
77
error[E0271]: type mismatch resolving `<E as GenericTrait<()>>::Associated == ()`
70
- --> $DIR/issue-87261.rs:68:5
78
+ --> $DIR/issue-87261.rs:68:27
71
79
|
72
80
LL | accepts_generic_trait(e);
73
- | ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
81
+ | --------------------- ^ expected `()`, found associated type
82
+ | |
83
+ | required by a bound introduced by this call
74
84
|
75
85
= note: expected unit type `()`
76
86
found associated type `<E as GenericTrait<()>>::Associated`
@@ -85,10 +95,12 @@ LL | E: GenericTrait<(), Associated = ()> + 'static,
85
95
| +++++++++++++++++
86
96
87
97
error[E0271]: type mismatch resolving `<F as GenericTrait<()>>::Associated == ()`
88
- --> $DIR/issue-87261.rs:71:5
98
+ --> $DIR/issue-87261.rs:71:27
89
99
|
90
100
LL | accepts_generic_trait(f);
91
- | ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
101
+ | --------------------- ^ expected `()`, found associated type
102
+ | |
103
+ | required by a bound introduced by this call
92
104
|
93
105
= note: expected unit type `()`
94
106
found associated type `<F as GenericTrait<()>>::Associated`
@@ -103,10 +115,12 @@ LL | F: GenericTrait<(), Associated = ()> + Foo,
103
115
| +++++++++++++++++
104
116
105
117
error[E0271]: type mismatch resolving `<G as GenericTrait<()>>::Associated == ()`
106
- --> $DIR/issue-87261.rs:74:5
118
+ --> $DIR/issue-87261.rs:74:27
107
119
|
108
120
LL | accepts_generic_trait(g);
109
- | ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
121
+ | --------------------- ^ expected `()`, found associated type
122
+ | |
123
+ | required by a bound introduced by this call
110
124
|
111
125
= note: expected unit type `()`
112
126
found associated type `<G as GenericTrait<()>>::Associated`
@@ -119,13 +133,15 @@ LL | fn accepts_generic_trait<T: GenericTrait<(), Associated = ()>>(_: T) {}
119
133
| ^^^^^^^^^^^^^^^ required by this bound in `accepts_generic_trait`
120
134
121
135
error[E0271]: type mismatch resolving `<impl Trait as Trait>::Associated == ()`
122
- --> $DIR/issue-87261.rs:79:5
136
+ --> $DIR/issue-87261.rs:79:19
123
137
|
124
138
LL | fn returns_opaque() -> impl Trait + 'static {
125
139
| -------------------- the found opaque type
126
140
...
127
141
LL | accepts_trait(returns_opaque());
128
- | ^^^^^^^^^^^^^ expected `()`, found associated type
142
+ | ------------- ^^^^^^^^^^^^^^^^ expected `()`, found associated type
143
+ | |
144
+ | required by a bound introduced by this call
129
145
|
130
146
= note: expected unit type `()`
131
147
found associated type `<impl Trait as Trait>::Associated`
@@ -140,13 +156,15 @@ LL | fn returns_opaque() -> impl Trait<Associated = ()> + 'static {
140
156
| +++++++++++++++++
141
157
142
158
error[E0271]: type mismatch resolving `<impl DerivedTrait as Trait>::Associated == ()`
143
- --> $DIR/issue-87261.rs:82:5
159
+ --> $DIR/issue-87261.rs:82:19
144
160
|
145
161
LL | fn returns_opaque_derived() -> impl DerivedTrait + 'static {
146
162
| --------------------------- the found opaque type
147
163
...
148
164
LL | accepts_trait(returns_opaque_derived());
149
- | ^^^^^^^^^^^^^ expected `()`, found associated type
165
+ | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
166
+ | |
167
+ | required by a bound introduced by this call
150
168
|
151
169
= note: expected unit type `()`
152
170
found associated type `<impl DerivedTrait as Trait>::Associated`
@@ -161,13 +179,15 @@ LL | fn returns_opaque_derived() -> impl DerivedTrait<Associated = ()> + 'static
161
179
| +++++++++++++++++
162
180
163
181
error[E0271]: type mismatch resolving `<impl Trait + Foo as Trait>::Associated == ()`
164
- --> $DIR/issue-87261.rs:85:5
182
+ --> $DIR/issue-87261.rs:85:19
165
183
|
166
184
LL | fn returns_opaque_foo() -> impl Trait + Foo {
167
185
| ---------------- the found opaque type
168
186
...
169
187
LL | accepts_trait(returns_opaque_foo());
170
- | ^^^^^^^^^^^^^ expected `()`, found associated type
188
+ | ------------- ^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
189
+ | |
190
+ | required by a bound introduced by this call
171
191
|
172
192
= note: expected unit type `()`
173
193
found associated type `<impl Trait + Foo as Trait>::Associated`
@@ -182,13 +202,15 @@ LL | fn returns_opaque_foo() -> impl Trait<Associated = ()> + Foo {
182
202
| +++++++++++++++++
183
203
184
204
error[E0271]: type mismatch resolving `<impl DerivedTrait + Foo as Trait>::Associated == ()`
185
- --> $DIR/issue-87261.rs:88:5
205
+ --> $DIR/issue-87261.rs:88:19
186
206
|
187
207
LL | fn returns_opaque_derived_foo() -> impl DerivedTrait + Foo {
188
208
| ----------------------- the found opaque type
189
209
...
190
210
LL | accepts_trait(returns_opaque_derived_foo());
191
- | ^^^^^^^^^^^^^ expected `()`, found associated type
211
+ | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
212
+ | |
213
+ | required by a bound introduced by this call
192
214
|
193
215
= note: expected unit type `()`
194
216
found associated type `<impl DerivedTrait + Foo as Trait>::Associated`
@@ -201,13 +223,15 @@ LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
201
223
| ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait`
202
224
203
225
error[E0271]: type mismatch resolving `<impl GenericTrait<()> as GenericTrait<()>>::Associated == ()`
204
- --> $DIR/issue-87261.rs:91:5
226
+ --> $DIR/issue-87261.rs:91:27
205
227
|
206
228
LL | fn returns_opaque_generic() -> impl GenericTrait<()> + 'static {
207
229
| ------------------------------- the found opaque type
208
230
...
209
231
LL | accepts_generic_trait(returns_opaque_generic());
210
- | ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
232
+ | --------------------- ^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
233
+ | |
234
+ | required by a bound introduced by this call
211
235
|
212
236
= note: expected unit type `()`
213
237
found associated type `<impl GenericTrait<()> as GenericTrait<()>>::Associated`
@@ -222,13 +246,15 @@ LL | fn returns_opaque_generic() -> impl GenericTrait<(), Associated = ()> + 'st
222
246
| +++++++++++++++++
223
247
224
248
error[E0271]: type mismatch resolving `<impl GenericTrait<()> + Foo as GenericTrait<()>>::Associated == ()`
225
- --> $DIR/issue-87261.rs:94:5
249
+ --> $DIR/issue-87261.rs:94:27
226
250
|
227
251
LL | fn returns_opaque_generic_foo() -> impl GenericTrait<()> + Foo {
228
252
| --------------------------- the found opaque type
229
253
...
230
254
LL | accepts_generic_trait(returns_opaque_generic_foo());
231
- | ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
255
+ | --------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
256
+ | |
257
+ | required by a bound introduced by this call
232
258
|
233
259
= note: expected unit type `()`
234
260
found associated type `<impl GenericTrait<()> + Foo as GenericTrait<()>>::Associated`
@@ -243,13 +269,15 @@ LL | fn returns_opaque_generic_foo() -> impl GenericTrait<(), Associated = ()> +
243
269
| +++++++++++++++++
244
270
245
271
error[E0271]: type mismatch resolving `<impl GenericTrait<()> + GenericTrait<u8> as GenericTrait<()>>::Associated == ()`
246
- --> $DIR/issue-87261.rs:97:5
272
+ --> $DIR/issue-87261.rs:97:27
247
273
|
248
274
LL | fn returns_opaque_generic_duplicate() -> impl GenericTrait<()> + GenericTrait<u8> {
249
275
| ---------------------------------------- the found opaque type
250
276
...
251
277
LL | accepts_generic_trait(returns_opaque_generic_duplicate());
252
- | ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
278
+ | --------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
279
+ | |
280
+ | required by a bound introduced by this call
253
281
|
254
282
= note: expected unit type `()`
255
283
found associated type `<impl GenericTrait<()> + GenericTrait<u8> as GenericTrait<()>>::Associated`
0 commit comments