summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/issue-49588-non-shorthand-field-patterns-in-pattern-macro.rs
blob: f30d7e2edcc882189a1d986ddf320162228b5e54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// run-pass
#![allow(unused_variables)]
#![deny(non_shorthand_field_patterns)]

pub struct Value<A> { pub value: A }

#[macro_export]
macro_rules! pat {
    ($a:pat) => {
        Value { value: $a }
    };
}

fn main() {
    let pat!(value) = Value { value: () };
}