summaryrefslogtreecommitdiffstats
path: root/tests/ui/macros/issue-44127.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/macros/issue-44127.rs')
-rw-r--r--tests/ui/macros/issue-44127.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/macros/issue-44127.rs b/tests/ui/macros/issue-44127.rs
new file mode 100644
index 000000000..21b2e6826
--- /dev/null
+++ b/tests/ui/macros/issue-44127.rs
@@ -0,0 +1,17 @@
+// run-pass
+
+#![feature(decl_macro)]
+
+pub struct Foo {
+ bar: u32,
+}
+pub macro pattern($a:pat) {
+ Foo { bar: $a }
+}
+
+fn main() {
+ match (Foo { bar: 3 }) {
+ pattern!(3) => println!("Test OK"),
+ _ => unreachable!(),
+ }
+}