diff options
Diffstat (limited to 'tests/ui/proc-macro/auxiliary/issue-42708.rs')
-rw-r--r-- | tests/ui/proc-macro/auxiliary/issue-42708.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/proc-macro/auxiliary/issue-42708.rs b/tests/ui/proc-macro/auxiliary/issue-42708.rs new file mode 100644 index 000000000..dae05204b --- /dev/null +++ b/tests/ui/proc-macro/auxiliary/issue-42708.rs @@ -0,0 +1,18 @@ +// force-host +// no-prefer-dynamic + +#![crate_type = "proc-macro"] + +extern crate proc_macro; + +use proc_macro::TokenStream; + +#[proc_macro_derive(Test)] +pub fn derive(_input: TokenStream) -> TokenStream { + "fn f(s: S) { s.x }".parse().unwrap() +} + +#[proc_macro_attribute] +pub fn attr_test(_attr: TokenStream, input: TokenStream) -> TokenStream { + input +} |