mbe: treat _ as ident

This commit is contained in:
Laurențiu Nicola 2020-12-18 17:47:48 +02:00
parent f4929fa9cc
commit 75a26f64ff
4 changed files with 18 additions and 3 deletions

View file

@ -991,6 +991,18 @@ fn test_tt_composite2() {
);
}
#[test]
fn test_underscore() {
parse_macro(
r#"
macro_rules! foo {
($_:tt) => { 0 }
}
"#,
)
.assert_expand_items(r#"foo! { => }"#, r#"0"#);
}
#[test]
fn test_lifetime() {
parse_macro(