blob: a3a20cb97e150d45e03d094342e7a6d70cdb3888 [file] [log] [blame]
#![allow(non_camel_case_types)]
#![deny(keyword_idents)]
mod outer_mod {
pub mod await { //~ ERROR `await` is a keyword in the 2018 edition
//~^ WARN this was previously accepted by the compiler
pub struct await; //~ ERROR `await` is a keyword in the 2018 edition
//~^ WARN this was previously accepted by the compiler
}
}
use outer_mod::await::await; //~ ERROR `await` is a keyword in the 2018 edition
//~^ ERROR `await` is a keyword in the 2018 edition
//~^^ WARN this was previously accepted by the compiler
//~^^^ WARN this was previously accepted by the compiler
struct Foo { await: () }
//~^ ERROR `await` is a keyword in the 2018 edition
//~^^ WARN this was previously accepted by the compiler
impl Foo { fn await() {} }
//~^ ERROR `await` is a keyword in the 2018 edition
//~^^ WARN this was previously accepted by the compiler
macro_rules! await {
//~^ ERROR `await` is a keyword in the 2018 edition
//~^^ WARN this was previously accepted by the compiler
() => {}
}
fn main() {
await!(); //~ ERROR `await` is a keyword in the 2018 edition
//~^ WARN this was previously accepted by the compiler
match await { await => {} } //~ ERROR `await` is a keyword in the 2018 edition
//~^ ERROR `await` is a keyword in the 2018 edition
//~^^ WARN this was previously accepted by the compiler
//~^^^ WARN this was previously accepted by the compiler
}