2020-06-30 13:41:37 -05:00
|
|
|
// force-host
|
|
|
|
|
2020-06-24 12:16:36 -05:00
|
|
|
#[macro_export]
|
|
|
|
macro_rules! make_it {
|
|
|
|
($name:ident) => {
|
|
|
|
#[proc_macro]
|
|
|
|
pub fn $name(input: TokenStream) -> TokenStream {
|
|
|
|
println!("Def site: {:?}", Span::def_site());
|
2020-07-21 18:51:07 -05:00
|
|
|
println!("Input: {:?}", input);
|
|
|
|
let new: TokenStream = input.into_iter().map(|mut t| {
|
|
|
|
t.set_span(Span::def_site());
|
|
|
|
t
|
|
|
|
}).collect();
|
|
|
|
println!("Respanned: {:?}", new);
|
|
|
|
new
|
2020-06-24 12:16:36 -05:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|