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 #104931 - Swatinem:async-pretty, r=eholk
Pretty-print generators with their `generator_kind`
After removing `GenFuture`, I special-cased async generators to pretty-print as `impl Future<Output = X>` mainly to avoid too much diagnostics changes originally.
This now reverses that change so that async fn/blocks are pretty-printed as `[$async-type@$source-position]` in various diagnostics, and updates the tests that this touches.
Copy file name to clipboardExpand all lines: src/test/ui/async-await/async-block-control-flow-static-semantics.stderr
+4-4
Original file line number
Diff line number
Diff line change
@@ -29,13 +29,13 @@ LL | |
29
29
LL | | }
30
30
| |_^ expected `u8`, found `()`
31
31
32
-
error[E0271]: expected `impl Future<Output = u8>` to be a future that resolves to `()`, but it resolves to `u8`
32
+
error[E0271]: expected `[async block@$DIR/async-block-control-flow-static-semantics.rs:23:17: 25:6]` to be a future that resolves to `()`, but it resolves to `u8`
= note: required for the cast from `impl Future<Output = u8>` to the object type `dyn Future<Output = ()>`
38
+
= note: required for the cast from `[async block@$DIR/async-block-control-flow-static-semantics.rs:23:17: 25:6]` to the object type `dyn Future<Output = ()>`
| implicitly returns `()` as its body has no tail or `return` expression
47
47
48
-
error[E0271]: expected `impl Future<Output = u8>` to be a future that resolves to `()`, but it resolves to `u8`
48
+
error[E0271]: expected `[async block@$DIR/async-block-control-flow-static-semantics.rs:14:17: 16:6]` to be a future that resolves to `()`, but it resolves to `u8`
= note: required for the cast from `impl Future<Output = u8>` to the object type `dyn Future<Output = ()>`
54
+
= note: required for the cast from `[async block@$DIR/async-block-control-flow-static-semantics.rs:14:17: 16:6]` to the object type `dyn Future<Output = ()>`
0 commit comments