1
Fork 0

Restore impl Future<Output = Type> to async blocks

This commit is contained in:
Michael Goulet 2022-03-30 19:26:35 -07:00
parent a40c595695
commit 7b2eaa3d8f
13 changed files with 36 additions and 23 deletions

View file

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