diff options
Diffstat (limited to 'tests/ui/async-await/await-keyword/2018-edition-error.rs')
| -rw-r--r-- | tests/ui/async-await/await-keyword/2018-edition-error.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/async-await/await-keyword/2018-edition-error.rs b/tests/ui/async-await/await-keyword/2018-edition-error.rs new file mode 100644 index 00000000000..7ce52259aca --- /dev/null +++ b/tests/ui/async-await/await-keyword/2018-edition-error.rs @@ -0,0 +1,16 @@ +// edition:2018 +#![allow(non_camel_case_types)] + +mod outer_mod { + pub mod await { //~ ERROR expected identifier + pub struct await; //~ ERROR expected identifier + } +} +use self::outer_mod::await::await; //~ ERROR expected identifier + //~^ ERROR expected identifier, found keyword `await` + +macro_rules! await { () => {}; } //~ ERROR expected identifier, found keyword `await` + +fn main() { + await!(); //~ ERROR expected expression, found `)` +} |
