You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
macro_rules! m {($($t:tt)*) => {};}m!{async try dyn await}
Compiling this code on the 2018 edition causes an following error:
error[E0721]: `await` is a keyword in the 2018 edition
--> src/main.rs:4:20
|
4 | m! { async try dyn await }
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0721`.
However, as with other keywords, this await keyword should be ignored through ($($t:tt)*) => {};.
The text was updated successfully, but these errors were encountered:
estebank
added
A-parser
Area: The lexing & parsing of Rust source code to an AST
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
labels
Jan 26, 2019
The problem is that await isn't a true keyword and has been given a custom error message (triggering eagerly), which doesn't have the same handling as normal keyword use errors. It seems simplest to leave this unaddressed until the await syntax has been chosen and we can use await as a true keyword.
Compiling this code on the 2018 edition causes an following error:
However, as with other keywords, this
await
keyword should be ignored through($($t:tt)*) => {};
.Playground
The text was updated successfully, but these errors were encountered: