Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/expand_macro.rs')
-rw-r--r--crates/ide/src/expand_macro.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/crates/ide/src/expand_macro.rs b/crates/ide/src/expand_macro.rs
index 4811f1f691..77668973ea 100644
--- a/crates/ide/src/expand_macro.rs
+++ b/crates/ide/src/expand_macro.rs
@@ -677,4 +677,26 @@ crate::Foo;
crate::Foo;"#]],
);
}
+
+ #[test]
+ fn semi_glueing() {
+ check(
+ r#"
+macro_rules! __log_value {
+ ($key:ident :$capture:tt =) => {};
+}
+
+macro_rules! __log {
+ ($key:tt $(:$capture:tt)? $(= $value:expr)?; $($arg:tt)+) => {
+ __log_value!($key $(:$capture)* = $($value)*);
+ };
+}
+
+__log!(written:%; "Test"$0);
+ "#,
+ expect![[r#"
+ __log!
+ "#]],
+ );
+ }
}