diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-03-17 22:55:06 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-17 22:55:06 +0100 |
| commit | 0c73b252eb024c2c9b16e2a03e0e2756e14b62bf (patch) | |
| tree | 2567635f9812594a4c7f701611e08a5ada68fc68 /compiler/rustc_feature/src | |
| parent | 270a41c33e6282933ddb3ef405e7089f3e92ea07 (diff) | |
| parent | e4f1179fa6b044adfd52d45ce35bfe4f5ad04c8f (diff) | |
Rollup merge of #94982 - skippy10110:deprecated_safe, r=Dylan-DPC
Add deprecated_safe feature gate and attribute, cc #94978
Diffstat (limited to 'compiler/rustc_feature/src')
| -rw-r--r-- | compiler/rustc_feature/src/active.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_feature/src/builtin_attrs.rs | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index d9748b19e13..02cdaa3b958 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -364,6 +364,8 @@ declare_features! ( (active, default_alloc_error_handler, "1.48.0", Some(66741), None), /// Allows default type parameters to influence type inference. (active, default_type_parameter_fallback, "1.3.0", Some(27336), None), + /// Allows using `#[deprecated_safe]` to deprecate the safeness of a function or trait + (active, deprecated_safe, "1.61.0", Some(94978), None), /// Allows having using `suggestion` in the `#[deprecated]` attribute. (active, deprecated_suggestion, "1.61.0", Some(94785), None), /// Allows `#[derive(Default)]` and `#[default]` on enums. diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index 9c7b8f80324..e2f0b413ff3 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -452,6 +452,11 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ "`default_method_body_is_const` is a temporary placeholder for declaring default bodies \ as `const`, which may be removed or renamed in the future." ), + // lang-team MCP 147 + gated!( + deprecated_safe, Normal, template!(List: r#"since = "version", note = "...""#), ErrorFollowing, + experimental!(deprecated_safe), + ), // ========================================================================== // Internal attributes: Stability, deprecation, and unsafe: |
