summaryrefslogtreecommitdiffstats
path: root/test cases/rust/18 proc-macro/proc.rs
blob: 53935e45d17f9aa99350e539c2fd9b89a6183fc4 (plain)
1
2
3
4
5
6
7
extern crate proc_macro;
use proc_macro::TokenStream;

#[proc_macro]
pub fn make_answer(_item: TokenStream) -> TokenStream {
    "fn answer() -> u32 { 42 }".parse().unwrap()
}