1 error[E0267]: `break` inside of an `async` block
2 --> $DIR/async-block-control-flow-static-semantics.rs:32:9
6 | | ^^^^^^^^^ cannot `break` inside of an `async` block
8 | |_____- enclosing `async` block
10 error[E0267]: `break` inside of an `async` block
11 --> $DIR/async-block-control-flow-static-semantics.rs:39:13
15 | | ^^^^^^^^^ cannot `break` inside of an `async` block
17 | |_________- enclosing `async` block
19 error[E0308]: mismatched types
20 --> $DIR/async-block-control-flow-static-semantics.rs:21:58
22 LL | async fn return_targets_async_block_not_async_fn() -> u8 {
23 | __________________________________________________________^
25 LL | | let block = async {
30 | |_^ expected `u8`, found `()`
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`
33 --> $DIR/async-block-control-flow-static-semantics.rs:26:39
35 LL | let _: &dyn Future<Output = ()> = █
36 | ^^^^^^ expected `()`, found `u8`
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 = ()>`
40 error[E0308]: mismatched types
41 --> $DIR/async-block-control-flow-static-semantics.rs:12:43
43 LL | fn return_targets_async_block_not_fn() -> u8 {
44 | --------------------------------- ^^ expected `u8`, found `()`
46 | implicitly returns `()` as its body has no tail or `return` expression
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`
49 --> $DIR/async-block-control-flow-static-semantics.rs:17:39
51 LL | let _: &dyn Future<Output = ()> = █
52 | ^^^^^^ expected `()`, found `u8`
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 = ()>`
56 error[E0308]: mismatched types
57 --> $DIR/async-block-control-flow-static-semantics.rs:49:44
59 LL | fn rethrow_targets_async_block_not_fn() -> Result<u8, MyErr> {
60 | ---------------------------------- ^^^^^^^^^^^^^^^^^ expected enum `Result`, found `()`
62 | implicitly returns `()` as its body has no tail or `return` expression
64 = note: expected enum `Result<u8, MyErr>`
67 error[E0308]: mismatched types
68 --> $DIR/async-block-control-flow-static-semantics.rs:58:50
70 LL | fn rethrow_targets_async_block_not_async_fn() -> Result<u8, MyErr> {
71 | ---------------------------------------- ^^^^^^^^^^^^^^^^^ expected enum `Result`, found `()`
73 | implicitly returns `()` as its body has no tail or `return` expression
75 = note: expected enum `Result<u8, MyErr>`
78 error: aborting due to 8 previous errors
80 Some errors have detailed explanations: E0267, E0271, E0308.
81 For more information about an error, try `rustc --explain E0267`.