]> git.lizzy.rs Git - rust.git/blob - tests/ui/binding/match-in-macro.rs
Rollup merge of #106625 - Swatinem:ref/cov6, r=nagisa
[rust.git] / tests / ui / binding / match-in-macro.rs
1 // run-pass
2
3 enum Foo {
4     B { b1: isize, bb1: isize},
5 }
6
7 macro_rules! match_inside_expansion {
8     () => (
9         match (Foo::B { b1:29 , bb1: 100}) {
10             Foo::B { b1:b2 , bb1:bb2 } => b2+bb2
11         }
12     )
13 }
14
15 pub fn main() {
16     assert_eq!(match_inside_expansion!(),129);
17 }