1 error[E0267]: `break` inside of an `async` block
2 --> $DIR/async-block-control-flow-static-semantics.rs:32:9
7 | | ^^^^^^^^^ cannot `break` inside of an `async` block
9 | |_____- enclosing `async` block
11 error[E0267]: `break` inside of an `async` block
12 --> $DIR/async-block-control-flow-static-semantics.rs:39:13
17 | | ^^^^^^^^^ cannot `break` inside of an `async` block
19 | |_________- enclosing `async` block
21 error[E0271]: type mismatch resolving `<impl Future<Output = u8> as Future>::Output == ()`
22 --> $DIR/async-block-control-flow-static-semantics.rs:26:39
24 LL | let _: &dyn Future<Output = ()> = █
25 | ^^^^^^ expected `()`, found `u8`
27 = note: required for the cast from `impl Future<Output = u8>` to the object type `dyn Future<Output = ()>`
29 error[E0308]: mismatched types
30 --> $DIR/async-block-control-flow-static-semantics.rs:21:58
32 LL | async fn return_targets_async_block_not_async_fn() -> u8 {
33 | __________________________________________________________^
35 LL | | let block = async {
40 | |_^ expected `u8`, found `()`
42 error[E0271]: type mismatch resolving `<impl Future<Output = u8> as Future>::Output == ()`
43 --> $DIR/async-block-control-flow-static-semantics.rs:17:39
45 LL | let _: &dyn Future<Output = ()> = █
46 | ^^^^^^ expected `()`, found `u8`
48 = note: required for the cast from `impl Future<Output = u8>` to the object type `dyn Future<Output = ()>`
50 error[E0308]: mismatched types
51 --> $DIR/async-block-control-flow-static-semantics.rs:12:43
53 LL | fn return_targets_async_block_not_fn() -> u8 {
54 | --------------------------------- ^^ expected `u8`, found `()`
56 | implicitly returns `()` as its body has no tail or `return` expression
58 error[E0308]: mismatched types
59 --> $DIR/async-block-control-flow-static-semantics.rs:47:44
61 LL | fn rethrow_targets_async_block_not_fn() -> Result<u8, MyErr> {
62 | ---------------------------------- ^^^^^^^^^^^^^^^^^ expected enum `Result`, found `()`
64 | implicitly returns `()` as its body has no tail or `return` expression
66 = note: expected enum `Result<u8, MyErr>`
69 error[E0308]: mismatched types
70 --> $DIR/async-block-control-flow-static-semantics.rs:56:50
72 LL | fn rethrow_targets_async_block_not_async_fn() -> Result<u8, MyErr> {
73 | ---------------------------------------- ^^^^^^^^^^^^^^^^^ expected enum `Result`, found `()`
75 | implicitly returns `()` as its body has no tail or `return` expression
77 = note: expected enum `Result<u8, MyErr>`
80 error: aborting due to 8 previous errors
82 Some errors have detailed explanations: E0267, E0271, E0308.
83 For more information about an error, try `rustc --explain E0267`.