Ignore third punct in 2-composite punct

This commit is contained in:
Edwin Cheng 2020-12-27 23:51:00 +08:00
parent 0fd75c98ac
commit 26e1f7696a
2 changed files with 36 additions and 20 deletions

View file

@ -991,6 +991,22 @@ fn test_tt_composite2() {
);
}
#[test]
fn test_tt_with_composite_without_space() {
parse_macro(
r#"
macro_rules! foo {
($ op:tt, $j:path) => (
0
)
}
"#,
)
// Test macro input without any spaces
// See https://github.com/rust-analyzer/rust-analyzer/issues/6692
.assert_expand_items("foo!(==,Foo::Bool)", "0");
}
#[test]
fn test_underscore() {
parse_macro(