summaryrefslogtreecommitdiffstats
path: root/src/test/ui/proc-macro/auxiliary/double.rs
blob: 99eb4e3754672e05e01b48f86eade2eb5aaf8e59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// force-host
// no-prefer-dynamic

#![feature(proc_macro_quote)]

#![crate_type = "proc-macro"]

extern crate proc_macro;
use proc_macro::*;

// Outputs another copy of the struct.  Useful for testing the tokens
// seen by the proc_macro.
#[proc_macro_derive(Double)]
pub fn derive(input: TokenStream) -> TokenStream {
    quote!(mod foo { $input })
}