1 error[E0267]: `break` inside of an `async` block
2 --> $DIR/async-block-control-flow-static-semantics.rs:33: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:40:13
17 | | ^^^^^^^^^ cannot `break` inside of an `async` block
19 | |_________- enclosing `async` block
21 error[E0308]: mismatched types
22 --> $DIR/async-block-control-flow-static-semantics.rs:13:43
24 LL | fn return_targets_async_block_not_fn() -> u8 {
25 | --------------------------------- ^^ expected u8, found ()
27 | implicitly returns `()` as its body has no tail or `return` expression
29 = note: expected type `u8`
32 error[E0271]: type mismatch resolving `<impl std::future::Future as std::future::Future>::Output == ()`
33 --> $DIR/async-block-control-flow-static-semantics.rs:18:39
35 LL | let _: &dyn Future<Output = ()> = █
36 | ^^^^^^ expected (), found u8
38 = note: expected type `()`
40 = note: required for the cast to the object type `dyn std::future::Future<Output = ()>`
42 error[E0308]: mismatched types
43 --> $DIR/async-block-control-flow-static-semantics.rs:22:58
45 LL | async fn return_targets_async_block_not_async_fn() -> u8 {
46 | __________________________________________________________^
48 LL | | let block = async {
53 | |_^ expected u8, found ()
55 = note: expected type `u8`
58 error[E0271]: type mismatch resolving `<impl std::future::Future as std::future::Future>::Output == ()`
59 --> $DIR/async-block-control-flow-static-semantics.rs:27:39
61 LL | let _: &dyn Future<Output = ()> = █
62 | ^^^^^^ expected (), found u8
64 = note: expected type `()`
66 = note: required for the cast to the object type `dyn std::future::Future<Output = ()>`
68 error[E0308]: mismatched types
69 --> $DIR/async-block-control-flow-static-semantics.rs:48:44
71 LL | fn rethrow_targets_async_block_not_fn() -> Result<u8, MyErr> {
72 | ---------------------------------- ^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found ()
74 | implicitly returns `()` as its body has no tail or `return` expression
76 = note: expected type `std::result::Result<u8, MyErr>`
79 error[E0308]: mismatched types
80 --> $DIR/async-block-control-flow-static-semantics.rs:57:50
82 LL | fn rethrow_targets_async_block_not_async_fn() -> Result<u8, MyErr> {
83 | ---------------------------------------- ^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found ()
85 | implicitly returns `()` as its body has no tail or `return` expression
87 = note: expected type `std::result::Result<u8, MyErr>`
90 error: aborting due to 8 previous errors
92 Some errors have detailed explanations: E0267, E0271, E0308.
93 For more information about an error, try `rustc --explain E0267`.