diff --git a/crates/mbe/src/tests.rs b/crates/mbe/src/tests.rs index 1d9afb4fb8..d854985c5b 100644 --- a/crates/mbe/src/tests.rs +++ b/crates/mbe/src/tests.rs @@ -1079,6 +1079,19 @@ fn test_vertical_bar_with_pat() { .assert_expand_items(r#"foo! { | x | }"#, r#"0"#); } +#[test] +fn test_dollar_crate_lhs_is_not_meta() { + parse_macro( + r#" +macro_rules! foo { + ($crate) => {}; + () => {0}; +} + "#, + ) + .assert_expand_items(r#"foo!{}"#, r#"0"#); +} + #[test] fn test_lifetime() { parse_macro(