rust/tests/ui/issues/issue-49588-non-shorthand-field-patterns-in-pattern-macro.rs
2023-01-11 09:32:08 +00:00

17 lines
266 B
Rust

// 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: () };
}