zng_task_proc_macros/util.rs
1/// `Ident` with custom span.
2macro_rules! ident_spanned {
3 ($span:expr=> $($format_name:tt)+) => {
4 proc_macro2::Ident::new(&format!($($format_name)+), $span)
5 };
6}
7
8/// `Ident` with call_site span.
9macro_rules! ident {
10 ($($tt:tt)*) => {
11 ident_spanned!(proc_macro2::Span::call_site()=> $($tt)*)
12 };
13}