11warning: `#[export_name]` attribute cannot be used on macro calls
2- --> $DIR/attr-on-mac-call.rs:6 :5
2+ --> $DIR/attr-on-mac-call.rs:7 :5
33 |
44LL | #[export_name = "x"]
55 | ^^^^^^^^^^^^^^^^^^^^
@@ -13,7 +13,7 @@ LL | #![warn(unused_attributes)]
1313 | ^^^^^^^^^^^^^^^^^
1414
1515warning: `#[naked]` attribute cannot be used on macro calls
16- --> $DIR/attr-on-mac-call.rs:9 :5
16+ --> $DIR/attr-on-mac-call.rs:10 :5
1717 |
1818LL | #[unsafe(naked)]
1919 | ^^^^^^^^^^^^^^^^
@@ -22,7 +22,7 @@ LL | #[unsafe(naked)]
2222 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
2323
2424warning: `#[track_caller]` attribute cannot be used on macro calls
25- --> $DIR/attr-on-mac-call.rs:12 :5
25+ --> $DIR/attr-on-mac-call.rs:13 :5
2626 |
2727LL | #[track_caller]
2828 | ^^^^^^^^^^^^^^^
@@ -31,7 +31,7 @@ LL | #[track_caller]
3131 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
3232
3333warning: `#[used]` attribute cannot be used on macro calls
34- --> $DIR/attr-on-mac-call.rs:15 :5
34+ --> $DIR/attr-on-mac-call.rs:16 :5
3535 |
3636LL | #[used]
3737 | ^^^^^^^
@@ -40,7 +40,7 @@ LL | #[used]
4040 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
4141
4242warning: `#[target_feature]` attribute cannot be used on macro calls
43- --> $DIR/attr-on-mac-call.rs:18 :5
43+ --> $DIR/attr-on-mac-call.rs:19 :5
4444 |
4545LL | #[target_feature(enable = "x")]
4646 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -49,7 +49,7 @@ LL | #[target_feature(enable = "x")]
4949 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
5050
5151warning: `#[deprecated]` attribute cannot be used on macro calls
52- --> $DIR/attr-on-mac-call.rs:21 :5
52+ --> $DIR/attr-on-mac-call.rs:22 :5
5353 |
5454LL | #[deprecated]
5555 | ^^^^^^^^^^^^^
@@ -58,7 +58,7 @@ LL | #[deprecated]
5858 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
5959
6060warning: `#[inline]` attribute cannot be used on macro calls
61- --> $DIR/attr-on-mac-call.rs:24 :5
61+ --> $DIR/attr-on-mac-call.rs:25 :5
6262 |
6363LL | #[inline]
6464 | ^^^^^^^^^
@@ -67,7 +67,7 @@ LL | #[inline]
6767 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
6868
6969warning: `#[link_name]` attribute cannot be used on macro calls
70- --> $DIR/attr-on-mac-call.rs:27 :5
70+ --> $DIR/attr-on-mac-call.rs:28 :5
7171 |
7272LL | #[link_name = "x"]
7373 | ^^^^^^^^^^^^^^^^^^
@@ -76,7 +76,7 @@ LL | #[link_name = "x"]
7676 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
7777
7878warning: `#[link_section]` attribute cannot be used on macro calls
79- --> $DIR/attr-on-mac-call.rs:30 :5
79+ --> $DIR/attr-on-mac-call.rs:31 :5
8080 |
8181LL | #[link_section = "__TEXT,__text"]
8282 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -85,7 +85,7 @@ LL | #[link_section = "__TEXT,__text"]
8585 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8686
8787warning: `#[link_ordinal]` attribute cannot be used on macro calls
88- --> $DIR/attr-on-mac-call.rs:33 :5
88+ --> $DIR/attr-on-mac-call.rs:34 :5
8989 |
9090LL | #[link_ordinal(42)]
9191 | ^^^^^^^^^^^^^^^^^^^
@@ -94,7 +94,7 @@ LL | #[link_ordinal(42)]
9494 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
9595
9696warning: `#[non_exhaustive]` attribute cannot be used on macro calls
97- --> $DIR/attr-on-mac-call.rs:36 :5
97+ --> $DIR/attr-on-mac-call.rs:37 :5
9898 |
9999LL | #[non_exhaustive]
100100 | ^^^^^^^^^^^^^^^^^
@@ -103,7 +103,7 @@ LL | #[non_exhaustive]
103103 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
104104
105105warning: `#[proc_macro]` attribute cannot be used on macro calls
106- --> $DIR/attr-on-mac-call.rs:39 :5
106+ --> $DIR/attr-on-mac-call.rs:40 :5
107107 |
108108LL | #[proc_macro]
109109 | ^^^^^^^^^^^^^
@@ -112,7 +112,7 @@ LL | #[proc_macro]
112112 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
113113
114114warning: `#[cold]` attribute cannot be used on macro calls
115- --> $DIR/attr-on-mac-call.rs:42 :5
115+ --> $DIR/attr-on-mac-call.rs:43 :5
116116 |
117117LL | #[cold]
118118 | ^^^^^^^
@@ -121,7 +121,7 @@ LL | #[cold]
121121 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
122122
123123warning: `#[no_mangle]` attribute cannot be used on macro calls
124- --> $DIR/attr-on-mac-call.rs:45 :5
124+ --> $DIR/attr-on-mac-call.rs:46 :5
125125 |
126126LL | #[no_mangle]
127127 | ^^^^^^^^^^^^
@@ -130,7 +130,7 @@ LL | #[no_mangle]
130130 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
131131
132132warning: `#[deprecated]` attribute cannot be used on macro calls
133- --> $DIR/attr-on-mac-call.rs:48 :5
133+ --> $DIR/attr-on-mac-call.rs:49 :5
134134 |
135135LL | #[deprecated]
136136 | ^^^^^^^^^^^^^
@@ -139,7 +139,7 @@ LL | #[deprecated]
139139 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
140140
141141warning: `#[automatically_derived]` attribute cannot be used on macro calls
142- --> $DIR/attr-on-mac-call.rs:51 :5
142+ --> $DIR/attr-on-mac-call.rs:52 :5
143143 |
144144LL | #[automatically_derived]
145145 | ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -148,7 +148,7 @@ LL | #[automatically_derived]
148148 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
149149
150150warning: `#[macro_use]` attribute cannot be used on macro calls
151- --> $DIR/attr-on-mac-call.rs:54 :5
151+ --> $DIR/attr-on-mac-call.rs:55 :5
152152 |
153153LL | #[macro_use]
154154 | ^^^^^^^^^^^^
@@ -157,7 +157,7 @@ LL | #[macro_use]
157157 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
158158
159159warning: `#[must_use]` attribute cannot be used on macro calls
160- --> $DIR/attr-on-mac-call.rs:57 :5
160+ --> $DIR/attr-on-mac-call.rs:58 :5
161161 |
162162LL | #[must_use]
163163 | ^^^^^^^^^^^
@@ -166,7 +166,7 @@ LL | #[must_use]
166166 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
167167
168168warning: `#[no_implicit_prelude]` attribute cannot be used on macro calls
169- --> $DIR/attr-on-mac-call.rs:60 :5
169+ --> $DIR/attr-on-mac-call.rs:61 :5
170170 |
171171LL | #[no_implicit_prelude]
172172 | ^^^^^^^^^^^^^^^^^^^^^^
@@ -175,7 +175,7 @@ LL | #[no_implicit_prelude]
175175 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
176176
177177warning: `#[path]` attribute cannot be used on macro calls
178- --> $DIR/attr-on-mac-call.rs:63 :5
178+ --> $DIR/attr-on-mac-call.rs:64 :5
179179 |
180180LL | #[path = ""]
181181 | ^^^^^^^^^^^^
@@ -184,7 +184,7 @@ LL | #[path = ""]
184184 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
185185
186186warning: `#[ignore]` attribute cannot be used on macro calls
187- --> $DIR/attr-on-mac-call.rs:66 :5
187+ --> $DIR/attr-on-mac-call.rs:67 :5
188188 |
189189LL | #[ignore]
190190 | ^^^^^^^^^
@@ -193,7 +193,7 @@ LL | #[ignore]
193193 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
194194
195195warning: `#[should_panic]` attribute cannot be used on macro calls
196- --> $DIR/attr-on-mac-call.rs:69 :5
196+ --> $DIR/attr-on-mac-call.rs:70 :5
197197 |
198198LL | #[should_panic]
199199 | ^^^^^^^^^^^^^^^
@@ -202,7 +202,7 @@ LL | #[should_panic]
202202 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
203203
204204warning: `#[link_name]` attribute cannot be used on macro calls
205- --> $DIR/attr-on-mac-call.rs:72 :5
205+ --> $DIR/attr-on-mac-call.rs:73 :5
206206 |
207207LL | #[link_name = "x"]
208208 | ^^^^^^^^^^^^^^^^^^
@@ -211,7 +211,7 @@ LL | #[link_name = "x"]
211211 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
212212
213213warning: `#[repr()]` attribute cannot be used on macro calls
214- --> $DIR/attr-on-mac-call.rs:77 :5
214+ --> $DIR/attr-on-mac-call.rs:78 :5
215215 |
216216LL | #[repr()]
217217 | ^^^^^^^^^
@@ -220,15 +220,15 @@ LL | #[repr()]
220220 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
221221
222222warning: unused attribute
223- --> $DIR/attr-on-mac-call.rs:77 :5
223+ --> $DIR/attr-on-mac-call.rs:78 :5
224224 |
225225LL | #[repr()]
226226 | ^^^^^^^^^ help: remove this attribute
227227 |
228228 = note: using `repr` with an empty list has no effect
229229
230230warning: `#[repr(u8)]` attribute cannot be used on macro calls
231- --> $DIR/attr-on-mac-call.rs:82 :5
231+ --> $DIR/attr-on-mac-call.rs:83 :5
232232 |
233233LL | #[repr(u8)]
234234 | ^^^^^^^^^^^
@@ -237,7 +237,7 @@ LL | #[repr(u8)]
237237 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
238238
239239warning: `#[repr(align(...))]` attribute cannot be used on macro calls
240- --> $DIR/attr-on-mac-call.rs:86 :5
240+ --> $DIR/attr-on-mac-call.rs:87 :5
241241 |
242242LL | #[repr(align(8))]
243243 | ^^^^^^^^^^^^^^^^^
@@ -246,7 +246,7 @@ LL | #[repr(align(8))]
246246 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
247247
248248warning: `#[repr(packed)]` attribute cannot be used on macro calls
249- --> $DIR/attr-on-mac-call.rs:90 :5
249+ --> $DIR/attr-on-mac-call.rs:91 :5
250250 |
251251LL | #[repr(packed)]
252252 | ^^^^^^^^^^^^^^^
@@ -255,7 +255,7 @@ LL | #[repr(packed)]
255255 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
256256
257257warning: `#[repr(C)]` attribute cannot be used on macro calls
258- --> $DIR/attr-on-mac-call.rs:94 :5
258+ --> $DIR/attr-on-mac-call.rs:95 :5
259259 |
260260LL | #[repr(C)]
261261 | ^^^^^^^^^^
@@ -264,7 +264,7 @@ LL | #[repr(C)]
264264 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
265265
266266warning: `#[repr(Rust)]` attribute cannot be used on macro calls
267- --> $DIR/attr-on-mac-call.rs:98 :5
267+ --> $DIR/attr-on-mac-call.rs:99 :5
268268 |
269269LL | #[repr(Rust)]
270270 | ^^^^^^^^^^^^^
@@ -273,13 +273,25 @@ LL | #[repr(Rust)]
273273 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
274274
275275warning: `#[repr(simd)]` attribute cannot be used on macro calls
276- --> $DIR/attr-on-mac-call.rs:102 :5
276+ --> $DIR/attr-on-mac-call.rs:103 :5
277277 |
278278LL | #[repr(simd)]
279279 | ^^^^^^^^^^^^^
280280 |
281281 = help: `#[repr(simd)]` can only be applied to structs
282282 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
283283
284- warning: 31 warnings emitted
284+ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![register_tool]`
285+ --> $DIR/attr-on-mac-call.rs:107:5
286+ |
287+ LL | #[register_tool(xyz)]
288+ | ^^^^^^^^^^^^^^^^^^^^^
289+ |
290+ note: this attribute does not have an `!`, which means it is applied to this macro call
291+ --> $DIR/attr-on-mac-call.rs:109:5
292+ |
293+ LL | unreachable!();
294+ | ^^^^^^^^^^^^^^
295+
296+ warning: 32 warnings emitted
285297
0 commit comments