rust/src/test/ui/await-keyword/2015-edition-warning.rs

28 lines
616 B
Rust
Raw Normal View History

// run-rustfix
#![allow(non_camel_case_types)]
#![deny(keyword_idents)]
mod outer_mod {
pub mod await {
2018-11-27 03:56:36 -06:00
//~^ ERROR `await` is a keyword
//~| WARN was previously accepted
pub struct await;
2018-11-27 03:56:36 -06:00
//~^ ERROR `await` is a keyword
//~| WARN was previously accepted
}
}
use outer_mod::await::await;
2018-11-27 03:56:36 -06:00
//~^ ERROR `await` is a keyword
//~| ERROR `await` is a keyword
//~| WARN was previously accepted
//~| WARN was previously accepted
fn main() {
match await { await => {} }
2018-11-27 03:56:36 -06:00
//~^ ERROR `await` is a keyword
//~| ERROR `await` is a keyword
//~| WARN was previously accepted
//~| WARN was previously accepted
}