]> git.lizzy.rs Git - rust.git/blob - src/test/ui/editions/async-block-2015.stderr
Rollup merge of #85534 - csmoe:demagnle-assert, r=michaelwoerister
[rust.git] / src / test / ui / editions / async-block-2015.stderr
1 error[E0670]: `async fn` is not permitted in Rust 2015
2   --> $DIR/async-block-2015.rs:1:1
3    |
4 LL | async fn foo() {
5    | ^^^^^ to use `async fn`, switch to Rust 2018 or later
6    |
7    = help: set `edition = "2018"` in `Cargo.toml`
8    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
9
10 error: expected identifier, found keyword `let`
11   --> $DIR/async-block-2015.rs:11:9
12    |
13 LL |     let y = async {
14    |             ----- `async` blocks are only allowed in Rust 2018 or later
15 LL |         let x = 42;
16    |         ^^^ expected identifier, found keyword
17    |
18    = help: set `edition = "2018"` in `Cargo.toml`
19    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
20
21 error: expected identifier, found `42`
22   --> $DIR/async-block-2015.rs:19:9
23    |
24 LL |     let z = async {
25    |             ----- `async` blocks are only allowed in Rust 2018 or later
26 LL |         42
27    |         ^^ expected identifier
28    |
29    = help: set `edition = "2018"` in `Cargo.toml`
30    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
31
32 error[E0422]: cannot find struct, variant or union type `async` in this scope
33   --> $DIR/async-block-2015.rs:7:13
34    |
35 LL |     let x = async {};
36    |             ^^^^^ `async` blocks are only allowed in Rust 2018 or later
37
38 error: aborting due to 4 previous errors
39
40 Some errors have detailed explanations: E0422, E0670.
41 For more information about an error, try `rustc --explain E0422`.