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 27, 2019
1 parent 93ff7dc commit 987d71f
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 987d71f

Please sign in to comment.