]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/await-keyword/2018-edition-error-in-non-macro-position.rs
Rollup merge of #107027 - GuillaumeGomez:rm-extra-removal, r=tmiasko
[rust.git] / tests / ui / async-await / await-keyword / 2018-edition-error-in-non-macro-position.rs
1 // edition:2018
2
3 #![allow(non_camel_case_types)]
4
5 mod outer_mod {
6     pub mod await { //~ ERROR expected identifier, found keyword `await`
7         pub struct await; //~ ERROR expected identifier, found keyword `await`
8     }
9 }
10 use self::outer_mod::await::await; //~ ERROR expected identifier, found keyword `await`
11 //~^ ERROR expected identifier, found keyword `await`
12
13 struct Foo { await: () }
14 //~^ ERROR expected identifier, found keyword `await`
15
16 impl Foo { fn await() {} }
17 //~^ ERROR expected identifier, found keyword `await`
18
19 macro_rules! await {
20 //~^ ERROR expected identifier, found keyword `await`
21     () => {}
22 }
23
24 fn main() {}