]> git.lizzy.rs Git - rust.git/blob - tests/ui/macros/issue-44127.rs
Rollup merge of #106714 - Ezrashaw:remove-e0490, r=davidtwco
[rust.git] / tests / ui / macros / issue-44127.rs
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 }