1 error[E0670]: `async fn` is not permitted in Rust 2015
2 --> $DIR/async-block-2015.rs:1:1
5 | ^^^^^ to use `async fn`, switch to Rust 2018 or later
7 = help: pass `--edition 2021` to `rustc`
8 = note: for more on editions, read https://doc.rust-lang.org/edition-guide
10 error: expected identifier, found keyword `let`
11 --> $DIR/async-block-2015.rs:11:9
14 | ----- `async` blocks are only allowed in Rust 2018 or later
16 | ^^^ expected identifier, found keyword
18 = help: pass `--edition 2021` to `rustc`
19 = note: for more on editions, read https://doc.rust-lang.org/edition-guide
21 error: expected identifier, found `42`
22 --> $DIR/async-block-2015.rs:19:9
25 | ----- `async` blocks are only allowed in Rust 2018 or later
27 | ^^ expected identifier
29 = help: pass `--edition 2021` to `rustc`
30 = note: for more on editions, read https://doc.rust-lang.org/edition-guide
32 error[E0422]: cannot find struct, variant or union type `async` in this scope
33 --> $DIR/async-block-2015.rs:7:13
35 LL | let x = async {};
36 | ^^^^^ `async` blocks are only allowed in Rust 2018 or later
38 error: aborting due to 4 previous errors
40 Some errors have detailed explanations: E0422, E0670.
41 For more information about an error, try `rustc --explain E0422`.