summaryrefslogtreecommitdiffstats
path: root/tests/ui/macros/auxiliary/attr-from-macro.rs
blob: 9b388675c80bf1fcc362172000e6890aadc85290 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#[macro_export]
macro_rules! creator {
    (struct $name1:ident; enum $name2:ident; enum $name3:ident;) => {
        #[derive(Debug)]
        pub struct $name1;

        #[derive(Debug)]
        #[repr(u32)]
        pub enum $name2 { A }

        #[derive(Debug)]
        #[repr(u16)]
        pub enum $name3 { A }
    }
}