diff options
Diffstat (limited to 'test cases/rust/18 proc-macro/proc.rs')
-rw-r--r-- | test cases/rust/18 proc-macro/proc.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test cases/rust/18 proc-macro/proc.rs b/test cases/rust/18 proc-macro/proc.rs new file mode 100644 index 0000000..53935e4 --- /dev/null +++ b/test cases/rust/18 proc-macro/proc.rs @@ -0,0 +1,7 @@ +extern crate proc_macro; +use proc_macro::TokenStream; + +#[proc_macro] +pub fn make_answer(_item: TokenStream) -> TokenStream { + "fn answer() -> u32 { 42 }".parse().unwrap() +} |