1 // rustc-env:CARGO=/usr/bin/cargo
4 use std::future::Future;
8 fn await_on_struct_missing() {
12 //~^ ERROR no field `await` on type
13 //~| NOTE unknown field
14 //~| NOTE to `.await` a `Future`, switch to Rust 2018
15 //~| HELP set `edition = "2021"` in `Cargo.toml`
16 //~| NOTE for more on editions, read https://doc.rust-lang.org/edition-guide
19 fn await_on_struct_similar() {
23 let x = S { awai: 42 };
25 //~^ ERROR no field `await` on type
26 //~| HELP a field with a similar name exists
27 //~| NOTE to `.await` a `Future`, switch to Rust 2018
28 //~| HELP set `edition = "2021"` in `Cargo.toml`
29 //~| NOTE for more on editions, read https://doc.rust-lang.org/edition-guide
32 fn await_on_63533(x: Pin<&mut dyn Future<Output = ()>>) {
34 //~^ ERROR no field `await` on type
35 //~| NOTE unknown field
36 //~| NOTE to `.await` a `Future`, switch to Rust 2018
37 //~| HELP set `edition = "2021"` in `Cargo.toml`
38 //~| NOTE for more on editions, read https://doc.rust-lang.org/edition-guide
41 fn await_on_apit(x: impl Future<Output = ()>) {
43 //~^ ERROR no field `await` on type
44 //~| NOTE to `.await` a `Future`, switch to Rust 2018
45 //~| HELP set `edition = "2021"` in `Cargo.toml`
46 //~| NOTE for more on editions, read https://doc.rust-lang.org/edition-guide