]>
Commit | Line | Data |
---|---|---|
8faf50e0 | 1 | error[E0428]: the name `my_macro` is defined multiple times |
a1dfa0c6 | 2 | --> $DIR/macro-namespace-reserved.rs:35:1 |
8faf50e0 XL |
3 | | |
4 | LL | pub fn my_macro(input: TokenStream) -> TokenStream { | |
5 | | -------------------------------------------------- previous definition of the macro `my_macro` here | |
6 | ... | |
7 | LL | macro my_macro() {} //~ ERROR the name `my_macro` is defined multiple times | |
8 | | ^^^^^^^^^^^^^^^^ `my_macro` redefined here | |
9 | | | |
10 | = note: `my_macro` must be defined only once in the macro namespace of this module | |
11 | ||
12 | error[E0428]: the name `my_macro_attr` is defined multiple times | |
a1dfa0c6 | 13 | --> $DIR/macro-namespace-reserved.rs:36:1 |
8faf50e0 XL |
14 | | |
15 | LL | pub fn my_macro_attr(input: TokenStream, _: TokenStream) -> TokenStream { | |
16 | | ----------------------------------------------------------------------- previous definition of the macro `my_macro_attr` here | |
17 | ... | |
18 | LL | macro my_macro_attr() {} //~ ERROR the name `my_macro_attr` is defined multiple times | |
19 | | ^^^^^^^^^^^^^^^^^^^^^ `my_macro_attr` redefined here | |
20 | | | |
21 | = note: `my_macro_attr` must be defined only once in the macro namespace of this module | |
22 | ||
23 | error[E0428]: the name `MyTrait` is defined multiple times | |
a1dfa0c6 | 24 | --> $DIR/macro-namespace-reserved.rs:37:1 |
8faf50e0 XL |
25 | | |
26 | LL | #[proc_macro_derive(MyTrait)] | |
27 | | ------- previous definition of the macro `MyTrait` here | |
28 | ... | |
29 | LL | macro MyTrait() {} //~ ERROR the name `MyTrait` is defined multiple times | |
30 | | ^^^^^^^^^^^^^^^ `MyTrait` redefined here | |
31 | | | |
32 | = note: `MyTrait` must be defined only once in the macro namespace of this module | |
33 | ||
34 | error[E0428]: the name `SameName` is defined multiple times | |
a1dfa0c6 | 35 | --> $DIR/macro-namespace-reserved.rs:45:1 |
8faf50e0 XL |
36 | | |
37 | LL | #[proc_macro_derive(SameName)] | |
38 | | -------- previous definition of the macro `SameName` here | |
39 | ... | |
40 | LL | pub fn SameName(input: TokenStream) -> TokenStream { | |
41 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `SameName` redefined here | |
42 | | | |
43 | = note: `SameName` must be defined only once in the macro namespace of this module | |
44 | ||
45 | error: aborting due to 4 previous errors | |
46 | ||
47 | For more information about this error, try `rustc --explain E0428`. |