From 53d05448c1d44b3ac2a46d54b40c3f2653fa0312 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Wed, 8 Apr 2020 18:34:20 +0800 Subject: Add L_DOLLAR for TYPE_RECOVERY_SET --- crates/ra_mbe/src/tests.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'crates/ra_mbe') diff --git a/crates/ra_mbe/src/tests.rs b/crates/ra_mbe/src/tests.rs index a7fcea0ac..254318e23 100644 --- a/crates/ra_mbe/src/tests.rs +++ b/crates/ra_mbe/src/tests.rs @@ -1614,6 +1614,23 @@ fn test_issue_2520() { ); } +#[test] +fn test_issue_3861() { + let macro_fixture = parse_macro( + r#" + macro_rules! rgb_color { + ($p:expr, $t: ty) => { + pub fn new() { + let _ = 0 as $t << $p; + } + }; + } + "#, + ); + + macro_fixture.expand_items(r#"rgb_color!(8 + 8, u32);"#); +} + #[test] fn test_repeat_bad_var() { // FIXME: the second rule of the macro should be removed and an error about -- cgit v1.2.3