You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rollup merge of rust-lang#120896 - compiler-errors:coro-closure-kind, r=oli-obk
Print kind of coroutine closure
Make sure that we print "async closure" when we have an async closure, rather than calling it generically a ["coroutine-closure"](rust-lang#120361).
Fixesrust-lang#120886
r? oli-obk
Copy file name to clipboardexpand all lines: tests/mir-opt/async_closure_shims.main-{closure#0}-{closure#0}.coroutine_closure_by_move.0.panic-abort.mir
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
// MIR for `main::{closure#0}::{closure#0}` 0 coroutine_closure_by_move
Copy file name to clipboardexpand all lines: tests/mir-opt/async_closure_shims.main-{closure#0}-{closure#0}.coroutine_closure_by_move.0.panic-unwind.mir
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
// MIR for `main::{closure#0}::{closure#0}` 0 coroutine_closure_by_move
Copy file name to clipboardexpand all lines: tests/mir-opt/async_closure_shims.main-{closure#0}-{closure#0}.coroutine_closure_by_mut.0.panic-unwind.mir
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
// MIR for `main::{closure#0}::{closure#0}` 0 coroutine_closure_by_mut
Copy file name to clipboardexpand all lines: tests/ui/async-await/async-closures/is-not-fn.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
error[E0271]: expected `{coroutine-closure@is-not-fn.rs:7:14}` to be a closure that returns `()`, but it returns `{async closure body@$DIR/is-not-fn.rs:7:23: 7:25}`
1
+
error[E0271]: expected `{async closure@is-not-fn.rs:7:14}` to be a closure that returns `()`, but it returns `{async closure body@$DIR/is-not-fn.rs:7:23: 7:25}`
| --- ^^^^^^^^^^^^^ `{coroutine-closure@$DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:11:25: 11:33}` is not a future
25
+
| --- ^^^^^^^^^^^^^ `{async closure@$DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:11:25: 11:33}` is not a future
26
26
| |
27
27
| required by a bound introduced by this call
28
28
|
29
-
= help: the trait `Future` is not implemented for `{coroutine-closure@$DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:11:25: 11:33}`
30
-
= note: {coroutine-closure@$DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:11:25: 11:33} must be a future or must implement `IntoFuture` to be awaited
29
+
= help: the trait `Future` is not implemented for `{async closure@$DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:11:25: 11:33}`
30
+
= note: {async closure@$DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:11:25: 11:33} must be a future or must implement `IntoFuture` to be awaited
0 commit comments