]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_feature/src/builtin_attrs.rs
Rollup merge of #106653 - ehuss:allow-features-help, r=nilstrieb
[rust.git] / compiler / rustc_feature / src / builtin_attrs.rs
index 6d8e78a0f185dc6a16c577b6bb2a6c386f51389a..af56a0b245987059426e27e8919856d7b2e36563 100644 (file)
@@ -70,7 +70,7 @@ impl std::fmt::Debug for AttributeGate {
     fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         match *self {
             Self::Gated(ref stab, name, expl, _) => {
-                write!(fmt, "Gated({:?}, {}, {})", stab, name, expl)
+                write!(fmt, "Gated({stab:?}, {name}, {expl})")
             }
             Self::Ungated => write!(fmt, "Ungated"),
         }
@@ -487,6 +487,9 @@ pub struct BuiltinAttribute {
         experimental!(collapse_debuginfo)
     ),
 
+    // RFC 2397
+    gated!(do_not_recommend, Normal, template!(Word), WarnFollowing, experimental!(do_not_recommend)),
+
     // ==========================================================================
     // Internal attributes: Stability, deprecation, and unsafe:
     // ==========================================================================