]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/await-keyword/2015-edition-warning.rs
Rollup merge of #106960 - estebank:parse-anon-enums, r=cjgillot
[rust.git] / tests / ui / async-await / await-keyword / 2015-edition-warning.rs
1 // run-rustfix
2
3 #![allow(non_camel_case_types)]
4 #![deny(keyword_idents)]
5
6 mod outer_mod {
7     pub mod await {
8 //~^ ERROR `await` is a keyword
9 //~| WARN this is accepted in the current edition
10         pub struct await;
11 //~^ ERROR `await` is a keyword
12 //~| WARN this is accepted in the current edition
13     }
14 }
15 use outer_mod::await::await;
16 //~^ ERROR `await` is a keyword
17 //~| ERROR `await` is a keyword
18 //~| WARN this is accepted in the current edition
19 //~| WARN this is accepted in the current edition
20
21 fn main() {
22     match await { await => {} }
23 //~^ ERROR `await` is a keyword
24 //~| ERROR `await` is a keyword
25 //~| WARN this is accepted in the current edition
26 //~| WARN this is accepted in the current edition
27 }