rust/tests/ui/editions/edition-keywords-2018-2018-parsing.stderr
Vadim Petrochenkov c586fe40f1 macro_rules: Add more tests for using tt in addition to ident
Generally, `tt` and `ident` should behave identically, modulo the latter accepting only a subset of token trees.
2024-01-05 19:13:52 +03:00

87 lines
2.9 KiB
Plaintext

error: expected identifier, found keyword `async`
--> $DIR/edition-keywords-2018-2018-parsing.rs:23:13
|
LL | let mut async = 1;
| ^^^^^ expected identifier, found keyword
|
help: escape `async` to use it as an identifier
|
LL | let mut r#async = 1;
| ++
error: expected identifier, found keyword `async`
--> $DIR/edition-keywords-2018-2018-parsing.rs:39:13
|
LL | module::async();
| ^^^^^ expected identifier, found keyword
|
help: escape `async` to use it as an identifier
|
LL | module::r#async();
| ++
error: no rules expected the token `r#async`
--> $DIR/edition-keywords-2018-2018-parsing.rs:27:31
|
LL | r#async = consumes_async!(r#async);
| ^^^^^^^ no rules expected this token in macro call
|
note: while trying to match `async`
--> $DIR/auxiliary/edition-kw-macro-2018.rs:17:6
|
LL | (async) => (1)
| ^^^^^
error: no rules expected the token `async`
--> $DIR/edition-keywords-2018-2018-parsing.rs:28:35
|
LL | r#async = consumes_async_raw!(async);
| ^^^^^ no rules expected this token in macro call
|
note: while trying to match `r#async`
--> $DIR/auxiliary/edition-kw-macro-2018.rs:22:6
|
LL | (r#async) => (1)
| ^^^^^^^
error: macro expansion ends with an incomplete expression: expected one of `move`, `|`, or `||`
--> $DIR/auxiliary/edition-kw-macro-2018.rs:27:23
|
LL | ($i: ident) => ($i)
| ^ expected one of `move`, `|`, or `||`
|
::: $DIR/edition-keywords-2018-2018-parsing.rs:31:8
|
LL | if passes_ident!(async) == 1 {} // FIXME: Edition hygiene bug, async here is 2018 and reserved
| -------------------- in this macro invocation
error: macro expansion ends with an incomplete expression: expected one of `move`, `|`, or `||`
--> $DIR/edition-keywords-2018-2018-parsing.rs:33:24
|
LL | if passes_tt!(async) == 1 {}
| ^ expected one of `move`, `|`, or `||`
error: macro expansion ends with an incomplete expression: expected one of `move`, `|`, or `||`
--> $DIR/edition-keywords-2018-2018-parsing.rs:16:23
|
LL | ($i: ident) => ($i)
| ^ expected one of `move`, `|`, or `||`
error: macro expansion ends with an incomplete expression: expected one of `move`, `|`, or `||`
--> $DIR/edition-keywords-2018-2018-parsing.rs:19:20
|
LL | ($i: tt) => ($i)
| ^ expected one of `move`, `|`, or `||`
error[E0308]: mismatched types
--> $DIR/edition-keywords-2018-2018-parsing.rs:42:33
|
LL | let _recovery_witness: () = 0;
| -- ^ expected `()`, found integer
| |
| expected due to this
error: aborting due to 9 previous errors
For more information about this error, try `rustc --explain E0308`.