diff options
Diffstat (limited to 'tests/ui/proc-macro/auxiliary/custom-attr-only-one-derive.rs')
-rw-r--r-- | tests/ui/proc-macro/auxiliary/custom-attr-only-one-derive.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/proc-macro/auxiliary/custom-attr-only-one-derive.rs b/tests/ui/proc-macro/auxiliary/custom-attr-only-one-derive.rs new file mode 100644 index 000000000..41f73f596 --- /dev/null +++ b/tests/ui/proc-macro/auxiliary/custom-attr-only-one-derive.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(Foo)] +pub fn foo(a: TokenStream) -> TokenStream { + "".parse().unwrap() +} + +#[proc_macro_derive(Bar, attributes(custom))] +pub fn bar(a: TokenStream) -> TokenStream { + "".parse().unwrap() +} |