@@ -160,7 +160,7 @@ help: consider constraining the associated type `<impl DerivedTrait as Trait>::A
160
160
LL | fn returns_opaque_derived() -> impl DerivedTrait<Associated = ()> + 'static {
161
161
| +++++++++++++++++
162
162
163
- error[E0271]: type mismatch resolving `<impl Foo + Trait as Trait>::Associated == ()`
163
+ error[E0271]: type mismatch resolving `<impl Trait + Foo as Trait>::Associated == ()`
164
164
--> $DIR/issue-87261.rs:85:5
165
165
|
166
166
LL | fn returns_opaque_foo() -> impl Trait + Foo {
@@ -170,18 +170,18 @@ LL | accepts_trait(returns_opaque_foo());
170
170
| ^^^^^^^^^^^^^ expected `()`, found associated type
171
171
|
172
172
= note: expected unit type `()`
173
- found associated type `<impl Foo + Trait as Trait>::Associated`
173
+ found associated type `<impl Trait + Foo as Trait>::Associated`
174
174
note: required by a bound in `accepts_trait`
175
175
--> $DIR/issue-87261.rs:43:27
176
176
|
177
177
LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
178
178
| ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait`
179
- help: consider constraining the associated type `<impl Foo + Trait as Trait>::Associated` to `()`
179
+ help: consider constraining the associated type `<impl Trait + Foo as Trait>::Associated` to `()`
180
180
|
181
181
LL | fn returns_opaque_foo() -> impl Trait<Associated = ()> + Foo {
182
182
| +++++++++++++++++
183
183
184
- error[E0271]: type mismatch resolving `<impl Foo + DerivedTrait as Trait>::Associated == ()`
184
+ error[E0271]: type mismatch resolving `<impl DerivedTrait + Foo as Trait>::Associated == ()`
185
185
--> $DIR/issue-87261.rs:88:5
186
186
|
187
187
LL | fn returns_opaque_derived_foo() -> impl DerivedTrait + Foo {
@@ -191,8 +191,8 @@ LL | accepts_trait(returns_opaque_derived_foo());
191
191
| ^^^^^^^^^^^^^ expected `()`, found associated type
192
192
|
193
193
= note: expected unit type `()`
194
- found associated type `<impl Foo + DerivedTrait as Trait>::Associated`
195
- = help: consider constraining the associated type `<impl Foo + DerivedTrait as Trait>::Associated` to `()`
194
+ found associated type `<impl DerivedTrait + Foo as Trait>::Associated`
195
+ = help: consider constraining the associated type `<impl DerivedTrait + Foo as Trait>::Associated` to `()`
196
196
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
197
197
note: required by a bound in `accepts_trait`
198
198
--> $DIR/issue-87261.rs:43:27
@@ -221,7 +221,7 @@ help: consider constraining the associated type `<impl GenericTrait<()> as Gener
221
221
LL | fn returns_opaque_generic() -> impl GenericTrait<(), Associated = ()> + 'static {
222
222
| +++++++++++++++++
223
223
224
- error[E0271]: type mismatch resolving `<impl Foo + GenericTrait<()> as GenericTrait<()>>::Associated == ()`
224
+ error[E0271]: type mismatch resolving `<impl GenericTrait<()> + Foo as GenericTrait<()>>::Associated == ()`
225
225
--> $DIR/issue-87261.rs:94:5
226
226
|
227
227
LL | fn returns_opaque_generic_foo() -> impl GenericTrait<()> + Foo {
@@ -231,18 +231,18 @@ LL | accepts_generic_trait(returns_opaque_generic_foo());
231
231
| ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
232
232
|
233
233
= note: expected unit type `()`
234
- found associated type `<impl Foo + GenericTrait<()> as GenericTrait<()>>::Associated`
234
+ found associated type `<impl GenericTrait<()> + Foo as GenericTrait<()>>::Associated`
235
235
note: required by a bound in `accepts_generic_trait`
236
236
--> $DIR/issue-87261.rs:44:46
237
237
|
238
238
LL | fn accepts_generic_trait<T: GenericTrait<(), Associated = ()>>(_: T) {}
239
239
| ^^^^^^^^^^^^^^^ required by this bound in `accepts_generic_trait`
240
- help: consider constraining the associated type `<impl Foo + GenericTrait<()> as GenericTrait<()>>::Associated` to `()`
240
+ help: consider constraining the associated type `<impl GenericTrait<()> + Foo as GenericTrait<()>>::Associated` to `()`
241
241
|
242
242
LL | fn returns_opaque_generic_foo() -> impl GenericTrait<(), Associated = ()> + Foo {
243
243
| +++++++++++++++++
244
244
245
- error[E0271]: type mismatch resolving `<impl GenericTrait<u8 > + GenericTrait<() > as GenericTrait<()>>::Associated == ()`
245
+ error[E0271]: type mismatch resolving `<impl GenericTrait<() > + GenericTrait<u8 > as GenericTrait<()>>::Associated == ()`
246
246
--> $DIR/issue-87261.rs:97:5
247
247
|
248
248
LL | fn returns_opaque_generic_duplicate() -> impl GenericTrait<()> + GenericTrait<u8> {
@@ -252,8 +252,8 @@ LL | accepts_generic_trait(returns_opaque_generic_duplicate());
252
252
| ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
253
253
|
254
254
= note: expected unit type `()`
255
- found associated type `<impl GenericTrait<u8 > + GenericTrait<() > as GenericTrait<()>>::Associated`
256
- = help: consider constraining the associated type `<impl GenericTrait<u8 > + GenericTrait<() > as GenericTrait<()>>::Associated` to `()`
255
+ found associated type `<impl GenericTrait<() > + GenericTrait<u8 > as GenericTrait<()>>::Associated`
256
+ = help: consider constraining the associated type `<impl GenericTrait<() > + GenericTrait<u8 > as GenericTrait<()>>::Associated` to `()`
257
257
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
258
258
note: required by a bound in `accepts_generic_trait`
259
259
--> $DIR/issue-87261.rs:44:46
0 commit comments