mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
mbe: treat _ as ident
This commit is contained in:
parent
f4929fa9cc
commit
75a26f64ff
4 changed files with 18 additions and 3 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue