]> git.lizzy.rs Git - rust.git/blob - tests/ui/proc-macro/auxiliary/multiple-derives.rs
Merge commit '598f0909568a51de8a2d1148f55a644fd8dffad0' into sync_cg_clif-2023-01-24
[rust.git] / tests / ui / proc-macro / auxiliary / multiple-derives.rs
1 // force-host
2 // no-prefer-dynamic
3
4 #![crate_type = "proc-macro"]
5
6 extern crate proc_macro;
7
8 use proc_macro::TokenStream;
9
10 macro_rules! make_derives {
11     ($($name:ident),*) => {
12         $(
13             #[proc_macro_derive($name)]
14             pub fn $name(input: TokenStream) -> TokenStream {
15                 println!("Derive {}: {}", stringify!($name), input);
16                 TokenStream::new()
17             }
18         )*
19     }
20 }
21
22 make_derives!(First, Second, Third, Fourth, Fifth);