]> git.proxmox.com Git - rustc.git/blob - src/test/ui/editions/edition-keywords-2018-2015-parsing.rs
New upstream version 1.33.0+dfsg1
[rustc.git] / src / test / ui / editions / edition-keywords-2018-2015-parsing.rs
1 // edition:2018
2 // aux-build:edition-kw-macro-2015.rs
3
4 #[macro_use]
5 extern crate edition_kw_macro_2015;
6
7 pub fn check_async() {
8 let mut async = 1; //~ ERROR expected identifier, found reserved keyword `async`
9 let mut r#async = 1; // OK
10
11 r#async = consumes_async!(async); // OK
12 r#async = consumes_async!(r#async); //~ ERROR no rules expected the token `r#async`
13 r#async = consumes_async_raw!(async); //~ ERROR no rules expected the token `async`
14 r#async = consumes_async_raw!(r#async); // OK
15
16 if passes_ident!(async) == 1 {}
17 if passes_ident!(r#async) == 1 {} // OK
18 module::async(); //~ ERROR expected identifier, found reserved keyword `async`
19 module::r#async(); // OK
20 }