]> git.proxmox.com Git - rustc.git/blame - src/test/ui/proc-macro/macro-namespace-reserved.stderr
New upstream version 1.32.0~beta.2+dfsg1
[rustc.git] / src / test / ui / proc-macro / macro-namespace-reserved.stderr
CommitLineData
8faf50e0 1error[E0428]: the name `my_macro` is defined multiple times
a1dfa0c6 2 --> $DIR/macro-namespace-reserved.rs:35:1
8faf50e0
XL
3 |
4LL | pub fn my_macro(input: TokenStream) -> TokenStream {
5 | -------------------------------------------------- previous definition of the macro `my_macro` here
6...
7LL | 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
12error[E0428]: the name `my_macro_attr` is defined multiple times
a1dfa0c6 13 --> $DIR/macro-namespace-reserved.rs:36:1
8faf50e0
XL
14 |
15LL | pub fn my_macro_attr(input: TokenStream, _: TokenStream) -> TokenStream {
16 | ----------------------------------------------------------------------- previous definition of the macro `my_macro_attr` here
17...
18LL | 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
23error[E0428]: the name `MyTrait` is defined multiple times
a1dfa0c6 24 --> $DIR/macro-namespace-reserved.rs:37:1
8faf50e0
XL
25 |
26LL | #[proc_macro_derive(MyTrait)]
27 | ------- previous definition of the macro `MyTrait` here
28...
29LL | 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
34error[E0428]: the name `SameName` is defined multiple times
a1dfa0c6 35 --> $DIR/macro-namespace-reserved.rs:45:1
8faf50e0
XL
36 |
37LL | #[proc_macro_derive(SameName)]
38 | -------- previous definition of the macro `SameName` here
39...
40LL | 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
45error: aborting due to 4 previous errors
46
47For more information about this error, try `rustc --explain E0428`.