about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/const_eval
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2025-08-12 12:52:39 +0200
committerMara Bos <m-ou.se@m-ou.se>2025-08-12 12:52:39 +0200
commit08acba30718281a068ab978f8feded9b871ec9db (patch)
tree10a474633d3a16e48c4c1386db8258e93fcfb536 /compiler/rustc_const_eval/src/const_eval
parenta1531335fe2807715fff569904d99602022643a7 (diff)
Revert "Partially outline code inside the panic! macro".
Without any tests/benchmarks that show some improvement, it's hard to
know whether the change had any positive effect at all. (And if it did,
whether that effect is still achieved today.)
Diffstat (limited to 'compiler/rustc_const_eval/src/const_eval')
-rw-r--r--compiler/rustc_const_eval/src/const_eval/machine.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/const_eval/machine.rs b/compiler/rustc_const_eval/src/const_eval/machine.rs
index a18ae79f318..da954cf4ed7 100644
--- a/compiler/rustc_const_eval/src/const_eval/machine.rs
+++ b/compiler/rustc_const_eval/src/const_eval/machine.rs
@@ -237,7 +237,7 @@ impl<'tcx> CompileTimeInterpCx<'tcx> {
     ) -> InterpResult<'tcx, Option<ty::Instance<'tcx>>> {
         let def_id = instance.def_id();
 
-        if self.tcx.has_attr(def_id, sym::rustc_const_panic_str)
+        if self.tcx.is_lang_item(def_id, LangItem::PanicDisplay)
             || self.tcx.is_lang_item(def_id, LangItem::BeginPanic)
         {
             let args = self.copy_fn_args(args);