|
1 |
| -error: expected one of `:` or `|`, found `)` |
2 |
| - --> $DIR/edition-2015.rs:3:26 |
| 1 | +error: `async` trait bounds are only allowed in Rust 2018 or later |
| 2 | + --> $DIR/edition-2015.rs:1:16 |
3 | 3 | |
|
4 |
| -LL | fn foo(x: impl async Fn()) -> impl async Fn() {} |
5 |
| - | ^ expected one of `:` or `|` |
| 4 | +LL | fn foo(x: impl async Fn()) -> impl async Fn() { x } |
| 5 | + | ^^^^^ |
| 6 | + | |
| 7 | + = help: pass `--edition 2021` to `rustc` |
| 8 | + = note: for more on editions, read https://doc.rust-lang.org/edition-guide |
| 9 | + |
| 10 | +error: `async` trait bounds are only allowed in Rust 2018 or later |
| 11 | + --> $DIR/edition-2015.rs:1:36 |
| 12 | + | |
| 13 | +LL | fn foo(x: impl async Fn()) -> impl async Fn() { x } |
| 14 | + | ^^^^^ |
| 15 | + | |
| 16 | + = help: pass `--edition 2021` to `rustc` |
| 17 | + = note: for more on editions, read https://doc.rust-lang.org/edition-guide |
6 | 18 |
|
7 |
| -error: expected one of `(`, `)`, `+`, `,`, `::`, or `<`, found `Fn` |
8 |
| - --> $DIR/edition-2015.rs:3:22 |
| 19 | +error[E0658]: async closures are unstable |
| 20 | + --> $DIR/edition-2015.rs:1:16 |
| 21 | + | |
| 22 | +LL | fn foo(x: impl async Fn()) -> impl async Fn() { x } |
| 23 | + | ^^^^^ |
9 | 24 | |
|
10 |
| -LL | fn foo(x: impl async Fn()) -> impl async Fn() {} |
11 |
| - | -^^ expected one of `(`, `)`, `+`, `,`, `::`, or `<` |
12 |
| - | | |
13 |
| - | help: missing `,` |
| 25 | + = note: see issue #62290 <https://github.com/rust-lang/rust/issues/62290> for more information |
| 26 | + = help: add `#![feature(async_closure)]` to the crate attributes to enable |
| 27 | + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date |
| 28 | + = help: to use an async block, remove the `||`: `async {` |
14 | 29 |
|
15 |
| -error: expected one of `(`, `+`, `::`, `<`, `where`, or `{`, found `Fn` |
16 |
| - --> $DIR/edition-2015.rs:3:42 |
| 30 | +error[E0658]: async closures are unstable |
| 31 | + --> $DIR/edition-2015.rs:1:36 |
| 32 | + | |
| 33 | +LL | fn foo(x: impl async Fn()) -> impl async Fn() { x } |
| 34 | + | ^^^^^ |
17 | 35 | |
|
18 |
| -LL | fn foo(x: impl async Fn()) -> impl async Fn() {} |
19 |
| - | ^^ expected one of `(`, `+`, `::`, `<`, `where`, or `{` |
| 36 | + = note: see issue #62290 <https://github.com/rust-lang/rust/issues/62290> for more information |
| 37 | + = help: add `#![feature(async_closure)]` to the crate attributes to enable |
| 38 | + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date |
| 39 | + = help: to use an async block, remove the `||`: `async {` |
20 | 40 |
|
21 |
| -error: aborting due to 3 previous errors |
| 41 | +error: aborting due to 4 previous errors |
22 | 42 |
|
| 43 | +For more information about this error, try `rustc --explain E0658`. |
0 commit comments