@@ -266,59 +266,7 @@ pub fn check_builtin_meta_item(
266
266
template: AttributeTemplate,
267
267
deny_unsafety: bool,
268
268
) {
269
- if !is_attr_template_compatible(&template, &meta.kind) {
270
- emit_malformed_attribute(psess, style, meta.span, name, template);
271
- }
272
-
273
- if deny_unsafety {
274
- deny_builtin_meta_unsafety(psess, meta);
275
- }
276
- }
277
-
278
- fn emit_malformed_attribute(
279
- psess: &ParseSess,
280
- style: ast::AttrStyle,
281
- span: Span,
282
- name: Symbol,
283
- template: AttributeTemplate,
284
- ) {
285
- // attrs with new parsers are locally validated so excluded here
286
- if matches!(
287
- name,
288
- sym::inline
289
- | sym::may_dangle
290
- | sym::rustc_as_ptr
291
- | sym::rustc_pub_transparent
292
- | sym::rustc_const_stable_indirect
293
- | sym::rustc_force_inline
294
- | sym::rustc_confusables
295
- | sym::rustc_skip_during_method_dispatch
296
- | sym::rustc_pass_by_value
297
- | sym::repr
298
- | sym::align
299
- | sym::deprecated
300
- | sym::optimize
301
- | sym::cold
302
- | sym::target_feature
303
- | sym::rustc_allow_const_fn_unstable
304
- | sym::naked
305
- | sym::no_mangle
306
- | sym::non_exhaustive
307
- | sym::path
308
- | sym::ignore
309
- | sym::must_use
310
- | sym::track_caller
311
- | sym::link_ordinal
312
- | sym::link_name
313
- | sym::export_name
314
- | sym::rustc_macro_transparency
315
- | sym::link_section
316
- | sym::rustc_layout_scalar_valid_range_start
317
- | sym::rustc_layout_scalar_valid_range_end
318
- | sym::no_implicit_prelude
319
- ) {
320
- return;
321
- // attrs with new parsers are locally validated so excluded here
269
+ if !is_attr_template_compatible(&template, &meta.kind) {// attrs with new parsers are locally validated so excluded here
322
270
if matches!(
323
271
name,
324
272
sym::inline
@@ -345,6 +293,7 @@ fn emit_malformed_attribute(
345
293
| sym::must_use
346
294
| sym::track_caller
347
295
| sym::link_name
296
+ | sym::link_ordinal
348
297
| sym::export_name
349
298
| sym::rustc_macro_transparency
350
299
| sym::link_section
0 commit comments