diff options
Diffstat (limited to 'tests/ui/proc-macro/define-two.rs')
-rw-r--r-- | tests/ui/proc-macro/define-two.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/proc-macro/define-two.rs b/tests/ui/proc-macro/define-two.rs new file mode 100644 index 000000000..b2184eae3 --- /dev/null +++ b/tests/ui/proc-macro/define-two.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(A)] +pub fn foo(input: TokenStream) -> TokenStream { + input +} + +#[proc_macro_derive(A)] //~ ERROR the name `A` is defined multiple times +pub fn bar(input: TokenStream) -> TokenStream { + input +} |