]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_ast_passes/src/feature_gate.rs
Auto merge of #88098 - Amanieu:oom_panic, r=nagisa
[rust.git] / compiler / rustc_ast_passes / src / feature_gate.rs
index 570ec45557dea7ad1c1e599427978e6e5471fb28..5b6147c72230d53b943586280b3a6d457d103886 100644 (file)
@@ -252,11 +252,12 @@ fn check_abi(&self, abi: ast::StrLit) {
                     "wasm ABI is experimental and subject to change"
                 );
             }
-            abi => self
-                .sess
-                .parse_sess
-                .span_diagnostic
-                .delay_span_bug(span, &format!("unrecognized ABI not caught in lowering: {}", abi)),
+            abi => {
+                self.sess.parse_sess.span_diagnostic.delay_span_bug(
+                    span,
+                    &format!("unrecognized ABI not caught in lowering: {}", abi),
+                );
+            }
         }
     }
 
@@ -437,13 +438,6 @@ macro_rules! gate_modifier { ($($name:literal => $feature:ident)*) => {
                 )
                 .emit();
             }
-        } else {
-            if attr.has_name(sym::deprecated) {
-                self.sess
-                    .struct_span_err(attr.span, "`#[deprecated]` cannot be used in staged API")
-                    .span_label(attr.span, "use `#[rustc_deprecated]` instead")
-                    .emit();
-            }
         }
     }