diff options
Diffstat (limited to 'tests/ui/proc-macro/auxiliary/issue-38586.rs')
-rw-r--r-- | tests/ui/proc-macro/auxiliary/issue-38586.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/proc-macro/auxiliary/issue-38586.rs b/tests/ui/proc-macro/auxiliary/issue-38586.rs new file mode 100644 index 000000000..f3a19081c --- /dev/null +++ b/tests/ui/proc-macro/auxiliary/issue-38586.rs @@ -0,0 +1,11 @@ +// force-host +// no-prefer-dynamic + +#![crate_type = "proc-macro"] + +extern crate proc_macro; + +#[proc_macro_derive(A)] +pub fn derive_a(_: proc_macro::TokenStream) -> proc_macro::TokenStream { + "fn f() { println!(\"{}\", foo); }".parse().unwrap() +} |