rust/tests/ui/macros/issue-33185.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
253 B
Rust
Raw Normal View History

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