Macro proc_macro_hack::proc_macro_item_impl [−][src]
Implement a hacky procedural macro that expands to items.
ⓘ
proc_macro_item_impl! { /// A function that always returns 2. pub fn two_fn_impl(input: &str) -> String { format!("fn {}() -> u8 {{ 2 }}", input) } }