From 028595548bea83508c9626835ac84409c83778ed Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Wed, 4 Mar 2020 22:29:55 +0800 Subject: Fix #3436 --- crates/ra_mbe/src/tests.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'crates/ra_mbe/src/tests.rs') diff --git a/crates/ra_mbe/src/tests.rs b/crates/ra_mbe/src/tests.rs index 1dba82915..5e6a090aa 100644 --- a/crates/ra_mbe/src/tests.rs +++ b/crates/ra_mbe/src/tests.rs @@ -825,6 +825,19 @@ fn test_tt_group() { ) .assert_expand_items(r#"foo! { fn foo() {} }"#, r#"fn foo () {}"#); } + +#[test] +fn test_tt_composite() { + parse_macro( + r#" + macro_rules! foo { + ($i:tt) => { 0 } + } + "#, + ) + .assert_expand_items(r#"foo! { => }"#, r#"0"#); +} + #[test] fn test_lifetime() { parse_macro( -- cgit v1.2.3