4 #![crate_type = "proc-macro"]
6 extern crate proc_macro;
8 use proc_macro::TokenStream;
10 macro_rules! make_derives {
11 ($($name:ident),*) => {
13 #[proc_macro_derive($name)]
14 pub fn $name(input: TokenStream) -> TokenStream {
15 println!("Derive {}: {}", stringify!($name), input);
22 make_derives!(First, Second, Third, Fourth, Fifth);