rust/tests/ui/macros/issue-33185.rs
2024-02-16 20:02:50 +00:00

18 lines
253 B
Rust

//@ run-pass
#![allow(dead_code)]
#[macro_export]
macro_rules! state {
( $( $name:ident : $field:ty )* ) => (
#[derive(Default)]
struct State {
$($name : $field),*
}
)
}
state! { x: i64 }
pub fn main() {
}