Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/macro_expansion_tests/mbe/matching.rs')
-rw-r--r--crates/hir-def/src/macro_expansion_tests/mbe/matching.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/crates/hir-def/src/macro_expansion_tests/mbe/matching.rs b/crates/hir-def/src/macro_expansion_tests/mbe/matching.rs
index 23d8b023b8..e9a977da91 100644
--- a/crates/hir-def/src/macro_expansion_tests/mbe/matching.rs
+++ b/crates/hir-def/src/macro_expansion_tests/mbe/matching.rs
@@ -184,3 +184,31 @@ fn test() {
"#]],
);
}
+
+#[test]
+fn meta_variable_raw_name_equals_non_raw() {
+ check(
+ r#"
+macro_rules! m {
+ ($r#name:tt) => {
+ $name
+ }
+}
+
+fn test() {
+ m!(1234)
+}
+"#,
+ expect![[r#"
+macro_rules! m {
+ ($r#name:tt) => {
+ $name
+ }
+}
+
+fn test() {
+ 1234
+}
+"#]],
+ );
+}