Skip to content

Commit 9ae575c

Browse files
Update test outputs
1 parent 471334e commit 9ae575c

30 files changed

+73
-73
lines changed

src/test/mir-opt/inline/issue_78442.bar.Inline.diff

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@
1919
+ _4 = hide_foo() -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/issue-78442.rs:11:5: 11:15
2020
// mir::Constant
2121
// + span: $DIR/issue-78442.rs:11:5: 11:13
22-
// + literal: Const { ty: fn() -> impl std::ops::Fn<()> {hide_foo}, val: Value(Scalar(<ZST>)) }
22+
// + literal: Const { ty: fn() -> impl Fn() -> () {hide_foo}, val: Value(Scalar(<ZST>)) }
2323
}
2424

2525
bb1: {
2626
_3 = &_4; // scope 0 at $DIR/issue-78442.rs:11:5: 11:15
2727
StorageLive(_5); // scope 0 at $DIR/issue-78442.rs:11:5: 11:17
28-
- _2 = <impl Fn<()> as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue-78442.rs:11:5: 11:17
28+
- _2 = <impl Fn() -> () as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue-78442.rs:11:5: 11:17
2929
- // mir::Constant
3030
- // + span: $DIR/issue-78442.rs:11:5: 11:15
31-
- // + literal: Const { ty: for<'r> extern "rust-call" fn(&'r impl std::ops::Fn<()>, ()) -> <impl std::ops::Fn<()> as std::ops::FnOnce<()>>::Output {<impl std::ops::Fn<()> as std::ops::Fn<()>>::call}, val: Value(Scalar(<ZST>)) }
31+
- // + literal: Const { ty: for<'r> extern "rust-call" fn(&'r impl Fn() -> (), ()) -> <impl Fn() -> () as std::ops::FnOnce<()>>::Output {<impl Fn() -> () as std::ops::Fn<()>>::call}, val: Value(Scalar(<ZST>)) }
3232
+ _2 = move (*_3)() -> [return: bb5, unwind: bb3]; // scope 1 at $DIR/issue-78442.rs:11:5: 11:17
3333
}
3434

src/test/mir-opt/inline/issue_78442.bar.RevealAll.diff

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
debug _baz => _1; // in scope 0 at $DIR/issue-78442.rs:9:5: 9:9
66
let mut _0: (); // return place in scope 0 at $DIR/issue-78442.rs:10:3: 10:3
77
let _2: (); // in scope 0 at $DIR/issue-78442.rs:11:5: 11:17
8-
- let mut _3: &impl std::ops::Fn<()>; // in scope 0 at $DIR/issue-78442.rs:11:5: 11:15
9-
- let _4: impl std::ops::Fn<()>; // in scope 0 at $DIR/issue-78442.rs:11:5: 11:15
8+
- let mut _3: &impl Fn() -> (); // in scope 0 at $DIR/issue-78442.rs:11:5: 11:15
9+
- let _4: impl Fn() -> (); // in scope 0 at $DIR/issue-78442.rs:11:5: 11:15
1010
+ let mut _3: &fn() {foo}; // in scope 0 at $DIR/issue-78442.rs:11:5: 11:15
1111
+ let _4: fn() {foo}; // in scope 0 at $DIR/issue-78442.rs:11:5: 11:15
1212
let mut _5: (); // in scope 0 at $DIR/issue-78442.rs:11:5: 11:17
@@ -18,17 +18,17 @@
1818
_4 = hide_foo() -> [return: bb1, unwind: bb4]; // scope 0 at $DIR/issue-78442.rs:11:5: 11:15
1919
// mir::Constant
2020
// + span: $DIR/issue-78442.rs:11:5: 11:13
21-
// + literal: Const { ty: fn() -> impl std::ops::Fn<()> {hide_foo}, val: Value(Scalar(<ZST>)) }
21+
// + literal: Const { ty: fn() -> impl Fn() -> () {hide_foo}, val: Value(Scalar(<ZST>)) }
2222
}
2323

2424
bb1: {
2525
_3 = &_4; // scope 0 at $DIR/issue-78442.rs:11:5: 11:15
2626
StorageLive(_5); // scope 0 at $DIR/issue-78442.rs:11:5: 11:17
2727
nop; // scope 0 at $DIR/issue-78442.rs:11:5: 11:17
28-
_2 = <impl Fn<()> as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue-78442.rs:11:5: 11:17
28+
_2 = <impl Fn() -> () as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue-78442.rs:11:5: 11:17
2929
// mir::Constant
3030
// + span: $DIR/issue-78442.rs:11:5: 11:15
31-
// + literal: Const { ty: for<'r> extern "rust-call" fn(&'r impl std::ops::Fn<()>, ()) -> <impl std::ops::Fn<()> as std::ops::FnOnce<()>>::Output {<impl std::ops::Fn<()> as std::ops::Fn<()>>::call}, val: Value(Scalar(<ZST>)) }
31+
// + literal: Const { ty: for<'r> extern "rust-call" fn(&'r impl Fn() -> (), ()) -> <impl Fn() -> () as std::ops::FnOnce<()>>::Output {<impl Fn() -> () as std::ops::Fn<()>>::call}, val: Value(Scalar(<ZST>)) }
3232
}
3333

3434
bb2: {

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 Foo + Trait 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 Foo + DerivedTrait 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 Foo + GenericTrait<()> 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<u8> + GenericTrait<()> 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 Foo + Trait 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 Foo + Trait 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 Foo + Trait 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 Foo + DerivedTrait 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 Foo + DerivedTrait as Trait>::Associated`
195+
= help: consider constraining the associated type `<impl Foo + DerivedTrait 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 Foo + GenericTrait<()> 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 Foo + GenericTrait<()> 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 Foo + GenericTrait<()> 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<u8> + GenericTrait<()> 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<u8> + GenericTrait<()> as GenericTrait<()>>::Associated`
256+
= help: consider constraining the associated type `<impl GenericTrait<u8> + GenericTrait<()> 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/async-await/async-block-control-flow-static-semantics.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ fn return_targets_async_block_not_fn() -> u8 {
1515
return 0u8;
1616
};
1717
let _: &dyn Future<Output = ()> = &block;
18-
//~^ ERROR type mismatch resolving `<impl Future as Future>::Output == ()`
18+
//~^ ERROR type mismatch
1919
}
2020

2121
async fn return_targets_async_block_not_async_fn() -> u8 {
22-
//~^ ERROR mismatched types
22+
//~^ ERROR mismatched types [E0308]
2323
let block = async {
2424
return 0u8;
2525
};
2626
let _: &dyn Future<Output = ()> = &block;
27-
//~^ ERROR type mismatch resolving `<impl Future as Future>::Output == ()`
27+
//~^ ERROR type mismatch resolving `<impl Future<Output = [async output]> as Future>::Output == ()`
2828
}
2929

3030
fn no_break_in_async_block() {

src/test/ui/async-await/async-block-control-flow-static-semantics.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ LL | |
3131
LL | | }
3232
| |_^ expected `u8`, found `()`
3333

34-
error[E0271]: type mismatch resolving `<impl Future as Future>::Output == ()`
34+
error[E0271]: type mismatch resolving `<impl Future<Output = [async output]> as Future>::Output == ()`
3535
--> $DIR/async-block-control-flow-static-semantics.rs:26:39
3636
|
3737
LL | let _: &dyn Future<Output = ()> = &block;
@@ -47,7 +47,7 @@ LL | fn return_targets_async_block_not_fn() -> u8 {
4747
| |
4848
| implicitly returns `()` as its body has no tail or `return` expression
4949

50-
error[E0271]: type mismatch resolving `<impl Future as Future>::Output == ()`
50+
error[E0271]: type mismatch resolving `<impl Future<Output = [async output]> as Future>::Output == ()`
5151
--> $DIR/async-block-control-flow-static-semantics.rs:17:39
5252
|
5353
LL | let _: &dyn Future<Output = ()> = &block;

src/test/ui/async-await/generator-desc.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ LL | pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
4646
| the expected opaque type
4747
| the found opaque type
4848
|
49-
= note: expected opaque type `impl Future` (`async` closure body)
50-
found opaque type `impl Future` (`async` closure body)
49+
= note: expected opaque type `impl Future<Output = [async output]>` (`async` closure body)
50+
found opaque type `impl Future<Output = [async output]>` (`async` closure body)
5151

5252
error: aborting due to 3 previous errors
5353

src/test/ui/async-await/issue-67252-unnamed-future.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: future cannot be sent between threads safely
44
LL | spawn(async {
55
| ^^^^^ future created by async block is not `Send`
66
|
7-
= help: within `impl Future`, the trait `Send` is not implemented for `*mut ()`
7+
= help: within `impl Future<Output = [async output]>`, the trait `Send` is not implemented for `*mut ()`
88
note: future is not `Send` as this value is used across an await
99
--> $DIR/issue-67252-unnamed-future.rs:20:9
1010
|

src/test/ui/async-await/issue-68112.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ LL | require_send(send_fut);
4444
= note: required because of the requirements on the impl of `Send` for `Arc<RefCell<i32>>`
4545
= note: required because it appears within the type `[static generator@$DIR/issue-68112.rs:47:31: 47:36]`
4646
= note: required because it appears within the type `from_generator::GenFuture<[static generator@$DIR/issue-68112.rs:47:31: 47:36]>`
47-
= note: required because it appears within the type `impl Future`
47+
= note: required because it appears within the type `impl Future<Output = [async output]>`
4848
= note: required because it appears within the type `impl Future<Output = Arc<RefCell<i32>>>`
4949
= note: required because it appears within the type `impl Future<Output = Arc<RefCell<i32>>>`
5050
= note: required because it appears within the type `{ResumeTy, impl Future<Output = Arc<RefCell<i32>>>, (), i32, Ready<i32>}`
5151
= note: required because it appears within the type `[static generator@$DIR/issue-68112.rs:55:26: 59:6]`
5252
= note: required because it appears within the type `from_generator::GenFuture<[static generator@$DIR/issue-68112.rs:55:26: 59:6]>`
53-
= note: required because it appears within the type `impl Future`
53+
= note: required because it appears within the type `impl Future<Output = [async output]>`
5454
note: required by a bound in `require_send`
5555
--> $DIR/issue-68112.rs:11:25
5656
|

src/test/ui/async-await/issues/issue-65436-raw-ptr-not-send.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: future cannot be sent between threads safely
44
LL | assert_send(async {
55
| ^^^^^^^^^^^ future created by async block is not `Send`
66
|
7-
= help: within `impl Future`, the trait `Send` is not implemented for `*const u8`
7+
= help: within `impl Future<Output = [async output]>`, the trait `Send` is not implemented for `*const u8`
88
note: future is not `Send` as this value is used across an await
99
--> $DIR/issue-65436-raw-ptr-not-send.rs:14:9
1010
|

src/test/ui/entry-point/imported_main_const_fn_item_type_forbidden.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ LL | type MainFn = impl Fn();
2121
LL | pub const BAR: MainFn = bar;
2222
| ^^^ expected opaque type, found fn item
2323
|
24-
= note: expected opaque type `impl Fn<()>`
24+
= note: expected opaque type `impl Fn() -> ()`
2525
found fn item `fn() {bar}`
2626

2727
error: could not find defining uses

src/test/ui/generator/issue-68112.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ note: generator is not `Send` as this value is used across a yield
99
--> $DIR/issue-68112.rs:31:9
1010
|
1111
LL | let _non_send_gen = make_non_send_generator();
12-
| ------------- has type `impl Generator` which is not `Send`
12+
| ------------- has type `impl Generator<Return = Arc<RefCell<i32>>>` which is not `Send`
1313
LL | yield;
1414
| ^^^^^ yield occurs here, with `_non_send_gen` maybe used later
1515
LL | };
@@ -29,9 +29,9 @@ LL | require_send(send_gen);
2929
= help: the trait `Sync` is not implemented for `RefCell<i32>`
3030
= note: required because of the requirements on the impl of `Send` for `Arc<RefCell<i32>>`
3131
= note: required because it appears within the type `[generator@$DIR/issue-68112.rs:38:5: 41:6]`
32-
= note: required because it appears within the type `impl Generator`
33-
= note: required because it appears within the type `impl Generator`
34-
= note: required because it appears within the type `{impl Generator, ()}`
32+
= note: required because it appears within the type `impl Generator<Return = Arc<RefCell<i32>>>`
33+
= note: required because it appears within the type `impl Generator<Return = Arc<RefCell<i32>>>`
34+
= note: required because it appears within the type `{impl Generator<Return = Arc<RefCell<i32>>>, ()}`
3535
= note: required because it appears within the type `[generator@$DIR/issue-68112.rs:48:20: 51:6]`
3636
note: required by a bound in `require_send`
3737
--> $DIR/issue-68112.rs:22:25

src/test/ui/impl-trait/auto-trait-leak2.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ error[E0277]: `Rc<Cell<i32>>` cannot be sent between threads safely
22
--> $DIR/auto-trait-leak2.rs:13:10
33
|
44
LL | fn before() -> impl Fn(i32) {
5-
| ------------ within this `impl Fn<(i32,)>`
5+
| ------------ within this `impl Fn(i32) -> ()`
66
...
77
LL | send(before());
88
| ---- ^^^^^^^^ `Rc<Cell<i32>>` cannot be sent between threads safely
99
| |
1010
| required by a bound introduced by this call
1111
|
12-
= help: within `impl Fn<(i32,)>`, the trait `Send` is not implemented for `Rc<Cell<i32>>`
12+
= help: within `impl Fn(i32) -> ()`, the trait `Send` is not implemented for `Rc<Cell<i32>>`
1313
= note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:7:5: 7:22]`
14-
= note: required because it appears within the type `impl Fn<(i32,)>`
14+
= note: required because it appears within the type `impl Fn(i32) -> ()`
1515
note: required by a bound in `send`
1616
--> $DIR/auto-trait-leak2.rs:10:12
1717
|
@@ -27,11 +27,11 @@ LL | send(after());
2727
| required by a bound introduced by this call
2828
...
2929
LL | fn after() -> impl Fn(i32) {
30-
| ------------ within this `impl Fn<(i32,)>`
30+
| ------------ within this `impl Fn(i32) -> ()`
3131
|
32-
= help: within `impl Fn<(i32,)>`, the trait `Send` is not implemented for `Rc<Cell<i32>>`
32+
= help: within `impl Fn(i32) -> ()`, the trait `Send` is not implemented for `Rc<Cell<i32>>`
3333
= note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:24:5: 24:22]`
34-
= note: required because it appears within the type `impl Fn<(i32,)>`
34+
= note: required because it appears within the type `impl Fn(i32) -> ()`
3535
note: required by a bound in `send`
3636
--> $DIR/auto-trait-leak2.rs:10:12
3737
|

src/test/ui/impl-trait/issue-55872-2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ impl<S> Bar for S {
1313
type E = impl std::marker::Copy;
1414
fn foo<T>() -> Self::E {
1515
//~^ ERROR type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
16-
//~| ERROR the trait bound `impl Future: Copy` is not satisfied [E0277]
16+
//~| ERROR the trait bound `impl Future<Output = [async output]>: Copy` is not satisfied
1717
async {}
1818
}
1919
}

0 commit comments

Comments
 (0)