1 #![feature(async_await, await_macro)]
2 #![allow(non_camel_case_types)]
3 #![deny(keyword_idents)]
6 pub mod await { //~ ERROR `await` is a keyword in the 2018 edition
7 //~^ WARN this was previously accepted by the compiler
8 pub struct await; //~ ERROR `await` is a keyword in the 2018 edition
9 //~^ WARN this was previously accepted by the compiler
12 use outer_mod::await::await; //~ ERROR `await` is a keyword in the 2018 edition
13 //~^ ERROR `await` is a keyword in the 2018 edition
14 //~^^ WARN this was previously accepted by the compiler
15 //~^^^ WARN this was previously accepted by the compiler
17 struct Foo { await: () }
18 //~^ ERROR `await` is a keyword in the 2018 edition
19 //~^^ WARN this was previously accepted by the compiler
21 impl Foo { fn await() {} }
22 //~^ ERROR `await` is a keyword in the 2018 edition
23 //~^^ WARN this was previously accepted by the compiler
26 //~^ ERROR `await` is a keyword in the 2018 edition
27 //~^^ WARN this was previously accepted by the compiler
32 match await { await => {} } //~ ERROR `await` is a keyword in the 2018 edition
33 //~^ ERROR `await` is a keyword in the 2018 edition
34 //~^^ WARN this was previously accepted by the compiler
35 //~^^^ WARN this was previously accepted by the compiler