2 //~^ ERROR `async fn` is not permitted in Rust 2015
3 //~| NOTE to use `async fn`, switch to Rust 2018 or later
4 //~| HELP pass `--edition 2021` to `rustc`
5 //~| NOTE for more on editions, read https://doc.rust-lang.org/edition-guide
8 //~^ ERROR cannot find struct, variant or union type `async` in this scope
9 //~| NOTE `async` blocks are only allowed in Rust 2018 or later
10 let y = async { //~ NOTE `async` blocks are only allowed in Rust 2018 or later
12 //~^ ERROR expected identifier, found keyword `let`
13 //~| NOTE expected identifier, found keyword
14 //~| HELP pass `--edition 2021` to `rustc`
15 //~| NOTE for more on editions, read https://doc.rust-lang.org/edition-guide
18 let z = async { //~ NOTE `async` blocks are only allowed in Rust 2018 or later
20 //~^ ERROR expected identifier, found `42`
21 //~| NOTE expected identifier
22 //~| HELP pass `--edition 2021` to `rustc`
23 //~| NOTE for more on editions, read https://doc.rust-lang.org/edition-guide