diff options
| author | Folkert de Vries <folkert@folkertdev.nl> | 2025-03-29 17:30:11 +0100 |
|---|---|---|
| committer | Folkert de Vries <folkert@folkertdev.nl> | 2025-04-19 00:03:35 +0200 |
| commit | 41ddf8672231c1f8cfa0fc754c1653f151030b19 (patch) | |
| tree | 005cc521b545437b4f34871d8149c82b5d6827d9 /compiler/rustc_parse/src | |
| parent | 191df20fcad9331d3a948aa8e8556775ec3fe69d (diff) | |
| download | rust-41ddf8672231c1f8cfa0fc754c1653f151030b19.tar.gz rust-41ddf8672231c1f8cfa0fc754c1653f151030b19.zip | |
Make `#[naked]` an unsafe attribute
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/validate_attr.rs | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/compiler/rustc_parse/src/validate_attr.rs b/compiler/rustc_parse/src/validate_attr.rs index b518fca7a65..6a1c2af48ed 100644 --- a/compiler/rustc_parse/src/validate_attr.rs +++ b/compiler/rustc_parse/src/validate_attr.rs @@ -194,12 +194,6 @@ pub fn check_attribute_safety(psess: &ParseSess, safety: AttributeSafety, attr: } } } else if let Safety::Unsafe(unsafe_span) = attr_item.unsafety { - // Allow (but don't require) `#[unsafe(naked)]` so that compiler-builtins can upgrade to it. - // FIXME(#139797): remove this special case when compiler-builtins has upgraded. - if attr.has_name(sym::naked) { - return; - } - psess.dcx().emit_err(errors::InvalidAttrUnsafe { span: unsafe_span, name: attr_item.path.clone(), |
