diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index d74e8442545b7..2c2dae0fef52e 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -862,13 +862,6 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ register_tool, CrateLevel, template!(List: &["tool1, tool2, ..."]), DuplicatesOk, EncodeCrossCrate::No, experimental!(register_tool), ), - - // lang-team MCP 147 - gated!( - deprecated_safe, Normal, template!(List: &[r#"since = "version", note = "...""#]), ErrorFollowing, - EncodeCrossCrate::Yes, experimental!(deprecated_safe), - ), - // `#[cfi_encoding = ""]` gated!( cfi_encoding, Normal, template!(NameValueStr: "encoding"), ErrorPreceding, diff --git a/compiler/rustc_feature/src/removed.rs b/compiler/rustc_feature/src/removed.rs index 4f4691468911a..71a735cd8cc78 100644 --- a/compiler/rustc_feature/src/removed.rs +++ b/compiler/rustc_feature/src/removed.rs @@ -102,6 +102,8 @@ declare_features! ( /// Allows default type parameters to influence type inference. (removed, default_type_parameter_fallback, "1.82.0", Some(27336), Some("never properly implemented; requires significant design work"), 127655), + /// Allows using `#[deprecated_safe]` to deprecate the safeness of a function or trait + (removed, deprecated_safe, "CURRENT_RUSTC_VERSION", Some(94978), Some("never properly implemented, in the way of attribute refactor"), 152554), /// Allows deriving traits as per `SmartPointer` specification (removed, derive_smart_pointer, "1.84.0", Some(123430), Some("replaced by `CoercePointee`"), 131284), /// Tells rustdoc to automatically generate `#[doc(cfg(...))]`. diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index add09c3ea58b0..082558cf9a93f 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -454,8 +454,6 @@ declare_features! ( /// Allows the use of default values on struct definitions and the construction of struct /// literals with the functional update syntax without a base. (unstable, default_field_values, "1.85.0", Some(132162)), - /// Allows using `#[deprecated_safe]` to deprecate the safeness of a function or trait - (unstable, deprecated_safe, "1.61.0", Some(94978)), /// Allows having using `suggestion` in the `#[deprecated]` attribute. (unstable, deprecated_suggestion, "1.61.0", Some(94785)), /// Allows deref patterns. diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs index b6f0e9fedd6d8..c559e799f1c5f 100644 --- a/compiler/rustc_passes/src/check_attr.rs +++ b/compiler/rustc_passes/src/check_attr.rs @@ -391,8 +391,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> { | sym::warn | sym::deny | sym::forbid - // need to be fixed - | sym::deprecated_safe // FIXME(deprecated_safe) // internal | sym::prelude_import | sym::panic_handler diff --git a/tests/ui/feature-gates/feature-gate-deprecated_safe.rs b/tests/ui/feature-gates/feature-gate-deprecated_safe.rs deleted file mode 100644 index d5f4a4705b972..0000000000000 --- a/tests/ui/feature-gates/feature-gate-deprecated_safe.rs +++ /dev/null @@ -1,7 +0,0 @@ -#[deprecated_safe(since = "TBD", note = "...")] //~ ERROR: the `#[deprecated_safe]` attribute is an experimental feature -unsafe fn deprecated_safe_fn() {} - -#[deprecated_safe(since = "TBD", note = "...")] //~ ERROR: the `#[deprecated_safe]` attribute is an experimental feature -unsafe trait DeprecatedSafeTrait {} - -fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-deprecated_safe.stderr b/tests/ui/feature-gates/feature-gate-deprecated_safe.stderr deleted file mode 100644 index 415d54463d1a4..0000000000000 --- a/tests/ui/feature-gates/feature-gate-deprecated_safe.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0658]: the `#[deprecated_safe]` attribute is an experimental feature - --> $DIR/feature-gate-deprecated_safe.rs:1:1 - | -LL | #[deprecated_safe(since = "TBD", note = "...")] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #94978 for more information - = help: add `#![feature(deprecated_safe)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0658]: the `#[deprecated_safe]` attribute is an experimental feature - --> $DIR/feature-gate-deprecated_safe.rs:4:1 - | -LL | #[deprecated_safe(since = "TBD", note = "...")] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #94978 for more information - = help: add `#![feature(deprecated_safe)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0658`.