]> git.lizzy.rs Git - rust.git/blob - tests/ui/editions/edition-keywords-2018-2015-parsing.rs
Don't resolve type var roots in point_at_expr_source_of_inferred_type
[rust.git] / tests / ui / editions / edition-keywords-2018-2015-parsing.rs
1 // edition:2018
2 // aux-build:edition-kw-macro-2015.rs
3
4 #![feature(async_closure)]
5
6 fn main() {}
7
8 #[macro_use]
9 extern crate edition_kw_macro_2015;
10
11 mod module {
12     pub fn r#async() {}
13 }
14
15 pub fn check_async() {
16     let mut async = 1; //~ ERROR expected identifier, found keyword `async`
17     let mut r#async = 1; // OK
18
19     r#async = consumes_async!(async); // OK
20     r#async = consumes_async!(r#async); //~ ERROR no rules expected the token `r#async`
21     r#async = consumes_async_raw!(async); //~ ERROR no rules expected the token `async`
22     r#async = consumes_async_raw!(r#async); // OK
23
24     if passes_ident!(async) == 1 {}
25     if passes_ident!(r#async) == 1 {} // OK
26     module::async(); //~ ERROR expected identifier, found keyword `async`
27     module::r#async(); // OK
28
29     let _recovery_witness: () = 0; //~ ERROR mismatched types
30 }