2019-04-18 14:55:23 -05:00
|
|
|
#![allow(non_camel_case_types)]
|
|
|
|
#![deny(keyword_idents)]
|
|
|
|
|
|
|
|
mod outer_mod {
|
|
|
|
pub mod await { //~ ERROR `await` is a keyword in the 2018 edition
|
2021-06-16 07:27:44 -05:00
|
|
|
//~^ WARN this is accepted in the current edition
|
2019-04-18 14:55:23 -05:00
|
|
|
pub struct await; //~ ERROR `await` is a keyword in the 2018 edition
|
2021-06-16 07:27:44 -05:00
|
|
|
//~^ WARN this is accepted in the current edition
|
2019-04-18 14:55:23 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
use outer_mod::await::await; //~ ERROR `await` is a keyword in the 2018 edition
|
|
|
|
//~^ ERROR `await` is a keyword in the 2018 edition
|
2021-06-16 07:27:44 -05:00
|
|
|
//~^^ WARN this is accepted in the current edition
|
|
|
|
//~^^^ WARN this is accepted in the current edition
|
2019-04-18 14:55:23 -05:00
|
|
|
|
|
|
|
struct Foo { await: () }
|
|
|
|
//~^ ERROR `await` is a keyword in the 2018 edition
|
2021-06-16 07:27:44 -05:00
|
|
|
//~^^ WARN this is accepted in the current edition
|
2019-04-18 14:55:23 -05:00
|
|
|
|
|
|
|
impl Foo { fn await() {} }
|
|
|
|
//~^ ERROR `await` is a keyword in the 2018 edition
|
2021-06-16 07:27:44 -05:00
|
|
|
//~^^ WARN this is accepted in the current edition
|
2019-04-18 14:55:23 -05:00
|
|
|
|
|
|
|
macro_rules! await {
|
|
|
|
//~^ ERROR `await` is a keyword in the 2018 edition
|
2021-06-16 07:27:44 -05:00
|
|
|
//~^^ WARN this is accepted in the current edition
|
2019-04-18 14:55:23 -05:00
|
|
|
() => {}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2019-07-01 23:46:35 -05:00
|
|
|
await!(); //~ ERROR `await` is a keyword in the 2018 edition
|
2021-06-16 07:27:44 -05:00
|
|
|
//~^ WARN this is accepted in the current edition
|
2019-07-01 23:46:35 -05:00
|
|
|
|
2019-04-18 14:55:23 -05:00
|
|
|
match await { await => {} } //~ ERROR `await` is a keyword in the 2018 edition
|
|
|
|
//~^ ERROR `await` is a keyword in the 2018 edition
|
2021-06-16 07:27:44 -05:00
|
|
|
//~^^ WARN this is accepted in the current edition
|
|
|
|
//~^^^ WARN this is accepted in the current edition
|
2019-04-18 14:55:23 -05:00
|
|
|
}
|