Skip to content

Commit

Permalink
Add a test for rust-lang#44127
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Feb 26, 2019
1 parent d6448a4 commit eef9612
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/test/ui/issues/issue-44127.rs
Original file line number Diff line number Diff line change
@@ -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!(),
}
}

0 comments on commit eef9612

Please sign in to comment.