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
This is similar to the same buggy behavior we saw for $:ident matchers fixed in 1.20.0.
For example in Rust 1.19 the following code fails to compile with the message "expected ident, found @", but correctly prints ident followed by other as of 1.20.
macro_rules! m {($ident:ident) => { println!("ident");};($other:tt) => { println!("other");};}fnmain(){m!(ident);m!(@);}
The $:lifetime matcher is currently broken in the same way.
macro_rules! m {($lifetime:lifetime) => { println!("lifetime");};($other:tt) => { println!("other");};}fnmain(){m!('lifetime);m!(@);}
error: expected a lifetime, found `@`
--> src/main.rs:8:8
|
8 | m!(@);
| ^
The text was updated successfully, but these errors were encountered:
dtolnay
added
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
C-bug
Category: This is a bug.
T-lang
Relevant to the language team
labels
Jun 10, 2018
This is similar to the same buggy behavior we saw for
$:ident
matchers fixed in 1.20.0.For example in Rust 1.19 the following code fails to compile with the message
"expected ident, found @"
, but correctly printsident
followed byother
as of 1.20.The
$:lifetime
matcher is currently broken in the same way.rustc 1.28.0-nightly (2a00629 2018-06-09)
@sgrif @durka
The text was updated successfully, but these errors were encountered: