Skip to content

Commit d99b132

Browse files
Fixup test outputs
1 parent 8805e93 commit d99b132

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

src/test/ui/associated-types/issue-87261.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,17 @@ fn main() {
8383
//~^ ERROR type mismatch resolving `<impl DerivedTrait as Trait>::Associated == ()`
8484

8585
accepts_trait(returns_opaque_foo());
86-
//~^ ERROR type mismatch resolving `<impl Trait+Foo as Trait>::Associated == ()`
86+
//~^ ERROR type mismatch resolving `<impl Trait + Foo as Trait>::Associated == ()`
8787

8888
accepts_trait(returns_opaque_derived_foo());
89-
//~^ ERROR type mismatch resolving `<impl DerivedTrait+Foo as Trait>::Associated == ()`
89+
//~^ ERROR type mismatch resolving `<impl DerivedTrait + Foo as Trait>::Associated == ()`
9090

9191
accepts_generic_trait(returns_opaque_generic());
9292
//~^ ERROR type mismatch resolving `<impl GenericTrait<()> as GenericTrait<()>>::Associated == ()`
9393

9494
accepts_generic_trait(returns_opaque_generic_foo());
95-
//~^ ERROR type mismatch resolving `<impl GenericTrait<()>+Foo as GenericTrait<()>>::Associated == ()`
95+
//~^ ERROR type mismatch resolving `<impl GenericTrait<()> + Foo as GenericTrait<()>>::Associated == ()`
9696

9797
accepts_generic_trait(returns_opaque_generic_duplicate());
98-
//~^ ERROR type mismatch resolving `<impl GenericTrait<()>+GenericTrait<u8> as GenericTrait<()>>::Associated == ()`
98+
//~^ ERROR type mismatch resolving `<impl GenericTrait<()> + GenericTrait<u8> as GenericTrait<()>>::Associated == ()`
9999
}

src/test/ui/associated-types/issue-87261.stderr

+12-12
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ help: consider constraining the associated type `<impl DerivedTrait as Trait>::A
160160
LL | fn returns_opaque_derived() -> impl DerivedTrait<Associated = ()> + 'static {
161161
| +++++++++++++++++
162162

163-
error[E0271]: type mismatch resolving `<impl Trait+Foo as Trait>::Associated == ()`
163+
error[E0271]: type mismatch resolving `<impl Trait + Foo as Trait>::Associated == ()`
164164
--> $DIR/issue-87261.rs:85:5
165165
|
166166
LL | fn returns_opaque_foo() -> impl Trait + Foo {
@@ -170,18 +170,18 @@ LL | accepts_trait(returns_opaque_foo());
170170
| ^^^^^^^^^^^^^ expected `()`, found associated type
171171
|
172172
= note: expected unit type `()`
173-
found associated type `<impl Trait+Foo as Trait>::Associated`
173+
found associated type `<impl Trait + Foo as Trait>::Associated`
174174
note: required by a bound in `accepts_trait`
175175
--> $DIR/issue-87261.rs:43:27
176176
|
177177
LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
178178
| ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait`
179-
help: consider constraining the associated type `<impl Trait+Foo as Trait>::Associated` to `()`
179+
help: consider constraining the associated type `<impl Trait + Foo as Trait>::Associated` to `()`
180180
|
181181
LL | fn returns_opaque_foo() -> impl Trait<Associated = ()> + Foo {
182182
| +++++++++++++++++
183183

184-
error[E0271]: type mismatch resolving `<impl DerivedTrait+Foo as Trait>::Associated == ()`
184+
error[E0271]: type mismatch resolving `<impl DerivedTrait + Foo as Trait>::Associated == ()`
185185
--> $DIR/issue-87261.rs:88:5
186186
|
187187
LL | fn returns_opaque_derived_foo() -> impl DerivedTrait + Foo {
@@ -191,8 +191,8 @@ LL | accepts_trait(returns_opaque_derived_foo());
191191
| ^^^^^^^^^^^^^ expected `()`, found associated type
192192
|
193193
= note: expected unit type `()`
194-
found associated type `<impl DerivedTrait+Foo as Trait>::Associated`
195-
= help: consider constraining the associated type `<impl DerivedTrait+Foo 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 `()`
196196
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
197197
note: required by a bound in `accepts_trait`
198198
--> $DIR/issue-87261.rs:43:27
@@ -221,7 +221,7 @@ help: consider constraining the associated type `<impl GenericTrait<()> as Gener
221221
LL | fn returns_opaque_generic() -> impl GenericTrait<(), Associated = ()> + 'static {
222222
| +++++++++++++++++
223223

224-
error[E0271]: type mismatch resolving `<impl GenericTrait<()>+Foo as GenericTrait<()>>::Associated == ()`
224+
error[E0271]: type mismatch resolving `<impl GenericTrait<()> + Foo as GenericTrait<()>>::Associated == ()`
225225
--> $DIR/issue-87261.rs:94:5
226226
|
227227
LL | fn returns_opaque_generic_foo() -> impl GenericTrait<()> + Foo {
@@ -231,18 +231,18 @@ LL | accepts_generic_trait(returns_opaque_generic_foo());
231231
| ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
232232
|
233233
= note: expected unit type `()`
234-
found associated type `<impl GenericTrait<()>+Foo as GenericTrait<()>>::Associated`
234+
found associated type `<impl GenericTrait<()> + Foo as GenericTrait<()>>::Associated`
235235
note: required by a bound in `accepts_generic_trait`
236236
--> $DIR/issue-87261.rs:44:46
237237
|
238238
LL | fn accepts_generic_trait<T: GenericTrait<(), Associated = ()>>(_: T) {}
239239
| ^^^^^^^^^^^^^^^ required by this bound in `accepts_generic_trait`
240-
help: consider constraining the associated type `<impl GenericTrait<()>+Foo as GenericTrait<()>>::Associated` to `()`
240+
help: consider constraining the associated type `<impl GenericTrait<()> + Foo as GenericTrait<()>>::Associated` to `()`
241241
|
242242
LL | fn returns_opaque_generic_foo() -> impl GenericTrait<(), Associated = ()> + Foo {
243243
| +++++++++++++++++
244244

245-
error[E0271]: type mismatch resolving `<impl GenericTrait<()>+GenericTrait<u8> as GenericTrait<()>>::Associated == ()`
245+
error[E0271]: type mismatch resolving `<impl GenericTrait<()> + GenericTrait<u8> as GenericTrait<()>>::Associated == ()`
246246
--> $DIR/issue-87261.rs:97:5
247247
|
248248
LL | fn returns_opaque_generic_duplicate() -> impl GenericTrait<()> + GenericTrait<u8> {
@@ -252,8 +252,8 @@ LL | accepts_generic_trait(returns_opaque_generic_duplicate());
252252
| ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
253253
|
254254
= note: expected unit type `()`
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 `()`
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 `()`
257257
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
258258
note: required by a bound in `accepts_generic_trait`
259259
--> $DIR/issue-87261.rs:44:46

src/test/ui/cast/casts-differing-anon.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0606]: casting `*mut impl Debug+?Sized` as `*mut impl Debug+?Sized` is invalid
1+
error[E0606]: casting `*mut impl Debug + ?Sized` as `*mut impl Debug + ?Sized` is invalid
22
--> $DIR/casts-differing-anon.rs:21:13
33
|
44
LL | b_raw = f_raw as *mut _;

0 commit comments

Comments
 (0)