From c43faf110de5ee6abce0899872457dc8904723ad Mon Sep 17 00:00:00 2001 From: Caio Date: Mon, 9 Jan 2023 20:51:01 -0300 Subject: [RFC 2397] Initial implementation --- compiler/rustc_feature/src/active.rs | 2 ++ compiler/rustc_feature/src/builtin_attrs.rs | 3 +++ 2 files changed, 5 insertions(+) (limited to 'compiler/rustc_feature/src') diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index beade4d44da..691c0955cad 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -374,6 +374,8 @@ declare_features! ( (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), + /// Controls errors in trait implementations. + (active, do_not_recommend, "1.67.0", Some(51992), None), /// Tells rustdoc to automatically generate `#[doc(cfg(...))]`. (active, doc_auto_cfg, "1.58.0", Some(43781), None), /// Allows `#[doc(cfg(...))]`. diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index ad85231860d..af56a0b2459 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -487,6 +487,9 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ experimental!(collapse_debuginfo) ), + // RFC 2397 + gated!(do_not_recommend, Normal, template!(Word), WarnFollowing, experimental!(do_not_recommend)), + // ========================================================================== // Internal attributes: Stability, deprecation, and unsafe: // ========================================================================== -- cgit 1.4.1-3-g733a5