11error: `#[sanitize]` attribute cannot be used on macro calls
2- --> $DIR/attr-on-mac-call.rs:76 :5
2+ --> $DIR/attr-on-mac-call.rs:77 :5
33 |
44LL | #[sanitize(address = "off")]
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66 |
77 = help: `#[sanitize]` can be applied to crates, functions, impl blocks, modules, and statics
88
99warning: `#[export_name]` attribute cannot be used on macro calls
10- --> $DIR/attr-on-mac-call.rs:7 :5
10+ --> $DIR/attr-on-mac-call.rs:8 :5
1111 |
1212LL | #[export_name = "x"]
1313 | ^^^^^^^^^^^^^^^^^^^^
@@ -21,7 +21,7 @@ LL | #![warn(unused_attributes)]
2121 | ^^^^^^^^^^^^^^^^^
2222
2323warning: `#[naked]` attribute cannot be used on macro calls
24- --> $DIR/attr-on-mac-call.rs:10 :5
24+ --> $DIR/attr-on-mac-call.rs:11 :5
2525 |
2626LL | #[unsafe(naked)]
2727 | ^^^^^^^^^^^^^^^^
@@ -30,7 +30,7 @@ LL | #[unsafe(naked)]
3030 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
3131
3232warning: `#[track_caller]` attribute cannot be used on macro calls
33- --> $DIR/attr-on-mac-call.rs:13 :5
33+ --> $DIR/attr-on-mac-call.rs:14 :5
3434 |
3535LL | #[track_caller]
3636 | ^^^^^^^^^^^^^^^
@@ -39,7 +39,7 @@ LL | #[track_caller]
3939 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
4040
4141warning: `#[used]` attribute cannot be used on macro calls
42- --> $DIR/attr-on-mac-call.rs:16 :5
42+ --> $DIR/attr-on-mac-call.rs:17 :5
4343 |
4444LL | #[used]
4545 | ^^^^^^^
@@ -48,7 +48,7 @@ LL | #[used]
4848 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
4949
5050warning: `#[target_feature]` attribute cannot be used on macro calls
51- --> $DIR/attr-on-mac-call.rs:19 :5
51+ --> $DIR/attr-on-mac-call.rs:20 :5
5252 |
5353LL | #[target_feature(enable = "x")]
5454 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -57,7 +57,7 @@ LL | #[target_feature(enable = "x")]
5757 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
5858
5959warning: `#[deprecated]` attribute cannot be used on macro calls
60- --> $DIR/attr-on-mac-call.rs:22 :5
60+ --> $DIR/attr-on-mac-call.rs:23 :5
6161 |
6262LL | #[deprecated]
6363 | ^^^^^^^^^^^^^
@@ -66,7 +66,7 @@ LL | #[deprecated]
6666 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
6767
6868warning: `#[inline]` attribute cannot be used on macro calls
69- --> $DIR/attr-on-mac-call.rs:25 :5
69+ --> $DIR/attr-on-mac-call.rs:26 :5
7070 |
7171LL | #[inline]
7272 | ^^^^^^^^^
@@ -75,7 +75,7 @@ LL | #[inline]
7575 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
7676
7777warning: `#[link_name]` attribute cannot be used on macro calls
78- --> $DIR/attr-on-mac-call.rs:28 :5
78+ --> $DIR/attr-on-mac-call.rs:29 :5
7979 |
8080LL | #[link_name = "x"]
8181 | ^^^^^^^^^^^^^^^^^^
@@ -84,7 +84,7 @@ LL | #[link_name = "x"]
8484 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8585
8686warning: `#[link_section]` attribute cannot be used on macro calls
87- --> $DIR/attr-on-mac-call.rs:31 :5
87+ --> $DIR/attr-on-mac-call.rs:32 :5
8888 |
8989LL | #[link_section = "__TEXT,__text"]
9090 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -93,7 +93,7 @@ LL | #[link_section = "__TEXT,__text"]
9393 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
9494
9595warning: `#[link_ordinal]` attribute cannot be used on macro calls
96- --> $DIR/attr-on-mac-call.rs:34 :5
96+ --> $DIR/attr-on-mac-call.rs:35 :5
9797 |
9898LL | #[link_ordinal(42)]
9999 | ^^^^^^^^^^^^^^^^^^^
@@ -102,7 +102,7 @@ LL | #[link_ordinal(42)]
102102 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
103103
104104warning: `#[non_exhaustive]` attribute cannot be used on macro calls
105- --> $DIR/attr-on-mac-call.rs:37 :5
105+ --> $DIR/attr-on-mac-call.rs:38 :5
106106 |
107107LL | #[non_exhaustive]
108108 | ^^^^^^^^^^^^^^^^^
@@ -111,7 +111,7 @@ LL | #[non_exhaustive]
111111 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
112112
113113warning: `#[proc_macro]` attribute cannot be used on macro calls
114- --> $DIR/attr-on-mac-call.rs:40 :5
114+ --> $DIR/attr-on-mac-call.rs:41 :5
115115 |
116116LL | #[proc_macro]
117117 | ^^^^^^^^^^^^^
@@ -120,7 +120,7 @@ LL | #[proc_macro]
120120 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
121121
122122warning: `#[cold]` attribute cannot be used on macro calls
123- --> $DIR/attr-on-mac-call.rs:43 :5
123+ --> $DIR/attr-on-mac-call.rs:44 :5
124124 |
125125LL | #[cold]
126126 | ^^^^^^^
@@ -129,7 +129,7 @@ LL | #[cold]
129129 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
130130
131131warning: `#[no_mangle]` attribute cannot be used on macro calls
132- --> $DIR/attr-on-mac-call.rs:46 :5
132+ --> $DIR/attr-on-mac-call.rs:47 :5
133133 |
134134LL | #[no_mangle]
135135 | ^^^^^^^^^^^^
@@ -138,7 +138,7 @@ LL | #[no_mangle]
138138 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
139139
140140warning: `#[deprecated]` attribute cannot be used on macro calls
141- --> $DIR/attr-on-mac-call.rs:49 :5
141+ --> $DIR/attr-on-mac-call.rs:50 :5
142142 |
143143LL | #[deprecated]
144144 | ^^^^^^^^^^^^^
@@ -147,7 +147,7 @@ LL | #[deprecated]
147147 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
148148
149149warning: `#[automatically_derived]` attribute cannot be used on macro calls
150- --> $DIR/attr-on-mac-call.rs:52 :5
150+ --> $DIR/attr-on-mac-call.rs:53 :5
151151 |
152152LL | #[automatically_derived]
153153 | ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -156,7 +156,7 @@ LL | #[automatically_derived]
156156 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
157157
158158warning: `#[macro_use]` attribute cannot be used on macro calls
159- --> $DIR/attr-on-mac-call.rs:55 :5
159+ --> $DIR/attr-on-mac-call.rs:56 :5
160160 |
161161LL | #[macro_use]
162162 | ^^^^^^^^^^^^
@@ -165,7 +165,7 @@ LL | #[macro_use]
165165 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
166166
167167warning: `#[must_use]` attribute cannot be used on macro calls
168- --> $DIR/attr-on-mac-call.rs:58 :5
168+ --> $DIR/attr-on-mac-call.rs:59 :5
169169 |
170170LL | #[must_use]
171171 | ^^^^^^^^^^^
@@ -174,7 +174,7 @@ LL | #[must_use]
174174 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
175175
176176warning: `#[no_implicit_prelude]` attribute cannot be used on macro calls
177- --> $DIR/attr-on-mac-call.rs:61 :5
177+ --> $DIR/attr-on-mac-call.rs:62 :5
178178 |
179179LL | #[no_implicit_prelude]
180180 | ^^^^^^^^^^^^^^^^^^^^^^
@@ -183,7 +183,7 @@ LL | #[no_implicit_prelude]
183183 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
184184
185185warning: `#[path]` attribute cannot be used on macro calls
186- --> $DIR/attr-on-mac-call.rs:64 :5
186+ --> $DIR/attr-on-mac-call.rs:65 :5
187187 |
188188LL | #[path = ""]
189189 | ^^^^^^^^^^^^
@@ -192,7 +192,7 @@ LL | #[path = ""]
192192 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
193193
194194warning: `#[ignore]` attribute cannot be used on macro calls
195- --> $DIR/attr-on-mac-call.rs:67 :5
195+ --> $DIR/attr-on-mac-call.rs:68 :5
196196 |
197197LL | #[ignore]
198198 | ^^^^^^^^^
@@ -201,7 +201,7 @@ LL | #[ignore]
201201 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
202202
203203warning: `#[should_panic]` attribute cannot be used on macro calls
204- --> $DIR/attr-on-mac-call.rs:70 :5
204+ --> $DIR/attr-on-mac-call.rs:71 :5
205205 |
206206LL | #[should_panic]
207207 | ^^^^^^^^^^^^^^^
@@ -210,7 +210,7 @@ LL | #[should_panic]
210210 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
211211
212212warning: `#[link_name]` attribute cannot be used on macro calls
213- --> $DIR/attr-on-mac-call.rs:73 :5
213+ --> $DIR/attr-on-mac-call.rs:74 :5
214214 |
215215LL | #[link_name = "x"]
216216 | ^^^^^^^^^^^^^^^^^^
@@ -219,7 +219,7 @@ LL | #[link_name = "x"]
219219 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
220220
221221warning: `#[repr()]` attribute cannot be used on macro calls
222- --> $DIR/attr-on-mac-call.rs:80 :5
222+ --> $DIR/attr-on-mac-call.rs:81 :5
223223 |
224224LL | #[repr()]
225225 | ^^^^^^^^^
@@ -228,15 +228,15 @@ LL | #[repr()]
228228 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
229229
230230warning: unused attribute
231- --> $DIR/attr-on-mac-call.rs:80 :5
231+ --> $DIR/attr-on-mac-call.rs:81 :5
232232 |
233233LL | #[repr()]
234234 | ^^^^^^^^^ help: remove this attribute
235235 |
236236 = note: using `repr` with an empty list has no effect
237237
238238warning: `#[repr(u8)]` attribute cannot be used on macro calls
239- --> $DIR/attr-on-mac-call.rs:85 :5
239+ --> $DIR/attr-on-mac-call.rs:86 :5
240240 |
241241LL | #[repr(u8)]
242242 | ^^^^^^^^^^^
@@ -245,7 +245,7 @@ LL | #[repr(u8)]
245245 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
246246
247247warning: `#[repr(align(...))]` attribute cannot be used on macro calls
248- --> $DIR/attr-on-mac-call.rs:89 :5
248+ --> $DIR/attr-on-mac-call.rs:90 :5
249249 |
250250LL | #[repr(align(8))]
251251 | ^^^^^^^^^^^^^^^^^
@@ -254,7 +254,7 @@ LL | #[repr(align(8))]
254254 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
255255
256256warning: `#[repr(packed)]` attribute cannot be used on macro calls
257- --> $DIR/attr-on-mac-call.rs:93 :5
257+ --> $DIR/attr-on-mac-call.rs:94 :5
258258 |
259259LL | #[repr(packed)]
260260 | ^^^^^^^^^^^^^^^
@@ -263,7 +263,7 @@ LL | #[repr(packed)]
263263 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
264264
265265warning: `#[repr(C)]` attribute cannot be used on macro calls
266- --> $DIR/attr-on-mac-call.rs:97 :5
266+ --> $DIR/attr-on-mac-call.rs:98 :5
267267 |
268268LL | #[repr(C)]
269269 | ^^^^^^^^^^
@@ -272,7 +272,7 @@ LL | #[repr(C)]
272272 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
273273
274274warning: `#[repr(Rust)]` attribute cannot be used on macro calls
275- --> $DIR/attr-on-mac-call.rs:101 :5
275+ --> $DIR/attr-on-mac-call.rs:102 :5
276276 |
277277LL | #[repr(Rust)]
278278 | ^^^^^^^^^^^^^
@@ -281,13 +281,25 @@ LL | #[repr(Rust)]
281281 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
282282
283283warning: `#[repr(simd)]` attribute cannot be used on macro calls
284- --> $DIR/attr-on-mac-call.rs:105 :5
284+ --> $DIR/attr-on-mac-call.rs:106 :5
285285 |
286286LL | #[repr(simd)]
287287 | ^^^^^^^^^^^^^
288288 |
289289 = help: `#[repr(simd)]` can only be applied to structs
290290 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
291291
292- error: aborting due to 1 previous error; 31 warnings emitted
292+ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![register_tool]`
293+ --> $DIR/attr-on-mac-call.rs:110:5
294+ |
295+ LL | #[register_tool(xyz)]
296+ | ^^^^^^^^^^^^^^^^^^^^^
297+ |
298+ note: this attribute does not have an `!`, which means it is applied to this macro call
299+ --> $DIR/attr-on-mac-call.rs:112:5
300+ |
301+ LL | unreachable!();
302+ | ^^^^^^^^^^^^^^
303+
304+ error: aborting due to 1 previous error; 32 warnings emitted
293305
0 commit comments