4 #![feature(proc_macro_quote)]
6 #![crate_type = "proc-macro"]
8 extern crate proc_macro;
11 // Outputs another copy of the struct. Useful for testing the tokens
12 // seen by the proc_macro.
13 #[proc_macro_derive(Double)]
14 pub fn derive(input: TokenStream) -> TokenStream {
15 quote!(mod foo { $input })