Skip to content

Commit eef9612

Browse files
committed
Add a test for rust-lang#44127
1 parent d6448a4 commit eef9612

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/test/ui/issues/issue-44127.rs

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// run-pass
2+
3+
#![feature(decl_macro)]
4+
5+
pub struct Foo {
6+
bar: u32,
7+
}
8+
pub macro pattern($a:pat) {
9+
Foo { bar: $a }
10+
}
11+
12+
fn main() {
13+
match (Foo { bar: 3 }) {
14+
pattern!(3) => println!("Test OK"),
15+
_ => unreachable!(),
16+
}
17+
}

0 commit comments

Comments
 (0)