]> git.lizzy.rs Git - rust.git/blob - tests/ui/proc-macro/define-two.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / proc-macro / define-two.rs
1 // force-host
2 // no-prefer-dynamic
3
4 #![crate_type = "proc-macro"]
5
6 extern crate proc_macro;
7
8 use proc_macro::TokenStream;
9
10 #[proc_macro_derive(A)]
11 pub fn foo(input: TokenStream) -> TokenStream {
12     input
13 }
14
15 #[proc_macro_derive(A)] //~ ERROR the name `A` is defined multiple times
16 pub fn bar(input: TokenStream) -> TokenStream {
17     input
18 }