@@ -5,52 +5,100 @@ LL | my_macro!();
55 | ^^^^^^^^
66
77error: can't use a procedural macro from the same crate that defines it
8- --> $DIR/macro-namespace-reserved-2.rs:36:3
8+ --> $DIR/macro-namespace-reserved-2.rs:29:5
9+ |
10+ LL | crate::my_macro_attr!();
11+ | ^^^^^^^^^^^^^^^^^^^^
12+
13+ error: expected macro, found attribute macro `crate::my_macro_attr`
14+ --> $DIR/macro-namespace-reserved-2.rs:29:5
15+ |
16+ LL | crate::my_macro_attr!();
17+ | ^^^^^^^^^^^^^^^^^^^^ not a macro
18+
19+ error: can't use a procedural macro from the same crate that defines it
20+ --> $DIR/macro-namespace-reserved-2.rs:34:5
21+ |
22+ LL | crate::MyTrait!();
23+ | ^^^^^^^^^^^^^^
24+
25+ error: expected macro, found derive macro `crate::MyTrait`
26+ --> $DIR/macro-namespace-reserved-2.rs:34:5
27+ |
28+ LL | crate::MyTrait!();
29+ | ^^^^^^^^^^^^^^ not a macro
30+
31+ error: can't use a procedural macro from the same crate that defines it
32+ --> $DIR/macro-namespace-reserved-2.rs:42:3
933 |
1034LL | #[my_macro_attr]
1135 | ^^^^^^^^^^^^^
1236
1337error: can't use a procedural macro from the same crate that defines it
14- --> $DIR/macro-namespace-reserved-2.rs:38 :3
38+ --> $DIR/macro-namespace-reserved-2.rs:44 :3
1539 |
1640LL | #[MyTrait]
1741 | ^^^^^^^
1842
19- error: `MyTrait` is a derive macro
20- --> $DIR/macro-namespace-reserved-2.rs:38:1
43+ error: expected attribute, found derive macro `MyTrait`
44+ --> $DIR/macro-namespace-reserved-2.rs:44:3
2145 |
2246LL | #[MyTrait]
23- | ^^^^^^^^^^
47+ | ^^^^^^^ not an attribute
2448
2549error: can't use a procedural macro from the same crate that defines it
26- --> $DIR/macro-namespace-reserved-2.rs:44:10
50+ --> $DIR/macro-namespace-reserved-2.rs:49:10
51+ |
52+ LL | #[derive(crate::my_macro)]
53+ | ^^^^^^^^^^^^^^^
54+
55+ error: expected derive macro, found macro `crate::my_macro`
56+ --> $DIR/macro-namespace-reserved-2.rs:49:10
57+ |
58+ LL | #[derive(crate::my_macro)]
59+ | ^^^^^^^^^^^^^^^ not a derive macro
60+
61+ error: can't use a procedural macro from the same crate that defines it
62+ --> $DIR/macro-namespace-reserved-2.rs:52:10
2763 |
2864LL | #[derive(my_macro_attr)]
2965 | ^^^^^^^^^^^^^
3066
31- error: macro `my_macro_attr` may not be used for derive attributes
32- --> $DIR/macro-namespace-reserved-2.rs:44 :10
67+ error: expected derive macro, found attribute macro `my_macro_attr`
68+ --> $DIR/macro-namespace-reserved-2.rs:52 :10
3369 |
3470LL | #[derive(my_macro_attr)]
35- | ^^^^^^^^^^^^^
71+ | ^^^^^^^^^^^^^ not a derive macro
3672
3773error: can't use a procedural macro from the same crate that defines it
38- --> $DIR/macro-namespace-reserved-2.rs:47 :10
74+ --> $DIR/macro-namespace-reserved-2.rs:55 :10
3975 |
4076LL | #[derive(MyTrait)]
4177 | ^^^^^^^
4278
4379error[E0658]: The attribute `my_macro` is currently unknown to the compiler and may have meaning added to it in the future
44- --> $DIR/macro-namespace-reserved-2.rs:34 :3
80+ --> $DIR/macro-namespace-reserved-2.rs:38 :3
4581 |
4682LL | #[my_macro]
4783 | ^^^^^^^^
4884 |
4985 = note: for more information, see https://github.com/rust-lang/rust/issues/29642
5086 = help: add #![feature(custom_attribute)] to the crate attributes to enable
5187
88+ error: can't use a procedural macro from the same crate that defines it
89+ --> $DIR/macro-namespace-reserved-2.rs:39:3
90+ |
91+ LL | #[crate::my_macro]
92+ | ^^^^^^^^^^^^^^^
93+
94+ error: expected attribute, found macro `crate::my_macro`
95+ --> $DIR/macro-namespace-reserved-2.rs:39:3
96+ |
97+ LL | #[crate::my_macro]
98+ | ^^^^^^^^^^^^^^^ not an attribute
99+
52100error: cannot find derive macro `my_macro` in this scope
53- --> $DIR/macro-namespace-reserved-2.rs:42 :10
101+ --> $DIR/macro-namespace-reserved-2.rs:48 :10
54102 |
55103LL | #[derive(my_macro)]
56104 | ^^^^^^^^
@@ -62,11 +110,11 @@ LL | my_macro_attr!();
62110 | ^^^^^^^^^^^^^
63111
64112error: cannot find macro `MyTrait!` in this scope
65- --> $DIR/macro-namespace-reserved-2.rs:31 :5
113+ --> $DIR/macro-namespace-reserved-2.rs:33 :5
66114 |
67115LL | MyTrait!();
68116 | ^^^^^^^
69117
70- error: aborting due to 11 previous errors
118+ error: aborting due to 19 previous errors
71119
72120For more information about this error, try `rustc --explain E0658`.
0 commit comments