]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/issues/issue-79099.stderr
Merge commit '266e96785ab71834b917bf474f130a6d8fdecd4b' into sync_cg_clif-2022-10-23
[rust.git] / src / test / ui / impl-trait / issues / issue-79099.stderr
1 error: expected identifier, found `1`
2   --> $DIR/issue-79099.rs:3:65
3    |
4 LL |         let f: impl core::future::Future<Output = u8> = async { 1 };
5    |                                                         -----   ^ expected identifier
6    |                                                         |
7    |                                                         `async` blocks are only allowed in Rust 2018 or later
8    |
9    = help: pass `--edition 2021` to `rustc`
10    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
11
12 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in variable binding
13   --> $DIR/issue-79099.rs:3:16
14    |
15 LL |         let f: impl core::future::Future<Output = u8> = async { 1 };
16    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17
18 error: aborting due to 2 previous errors
19
20 For more information about this error, try `rustc --explain E0562`.