From 26e1f7696ae3903f868e50409fb7ee70ee37d6db Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Sun, 27 Dec 2020 23:51:00 +0800 Subject: Ignore third punct in 2-composite punct --- crates/mbe/src/tests.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'crates/mbe/src/tests.rs') diff --git a/crates/mbe/src/tests.rs b/crates/mbe/src/tests.rs index 451fa1456..6cd0ed205 100644 --- a/crates/mbe/src/tests.rs +++ b/crates/mbe/src/tests.rs @@ -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( -- cgit v1.2.3