2 use std::future::Future;
6 fn await_on_struct_missing() {
10 //~^ ERROR no field `await` on type
11 //~| NOTE unknown field
12 //~| NOTE to `.await` a `Future`, switch to Rust 2018
13 //~| HELP pass `--edition 2021` to `rustc`
14 //~| NOTE for more on editions, read https://doc.rust-lang.org/edition-guide
17 fn await_on_struct_similar() {
21 let x = S { awai: 42 };
23 //~^ ERROR no field `await` on type
24 //~| HELP a field with a similar name exists
25 //~| NOTE to `.await` a `Future`, switch to Rust 2018
26 //~| HELP pass `--edition 2021` to `rustc`
27 //~| NOTE for more on editions, read https://doc.rust-lang.org/edition-guide
30 fn await_on_63533(x: Pin<&mut dyn Future<Output = ()>>) {
32 //~^ ERROR no field `await` on type
33 //~| NOTE unknown field
34 //~| NOTE to `.await` a `Future`, switch to Rust 2018
35 //~| HELP pass `--edition 2021` to `rustc`
36 //~| NOTE for more on editions, read https://doc.rust-lang.org/edition-guide
39 fn await_on_apit(x: impl Future<Output = ()>) {
41 //~^ ERROR no field `await` on type
42 //~| NOTE to `.await` a `Future`, switch to Rust 2018
43 //~| HELP pass `--edition 2021` to `rustc`
44 //~| NOTE for more on editions, read https://doc.rust-lang.org/edition-guide