diff options
| author | bors <bors@rust-lang.org> | 2023-10-01 05:56:47 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-10-01 05:56:47 +0000 |
| commit | 8fa7bdf191d8658e5ab670766ac0b2d40c7d83c2 (patch) | |
| tree | fd128009072805b2b9f7d1208a6af4ef1b2c1220 /compiler/rustc_const_eval/src/const_eval | |
| parent | 361096fa4b77e7fd9effec0a7feef139565d7a25 (diff) | |
| parent | 6a02baaa3d9c471577037a053ee8ed50a9327f7d (diff) | |
Auto merge of #115670 - Zoxc:outline-panic-macro-1, r=Mark-Simulacrum
Partially outline code inside the panic! macro This outlines code inside the panic! macro in some cases. This is split out from https://github.com/rust-lang/rust/pull/115562 to exclude changes to rustc.
Diffstat (limited to 'compiler/rustc_const_eval/src/const_eval')
| -rw-r--r-- | compiler/rustc_const_eval/src/const_eval/machine.rs | 2 |
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 14b9894aad5..865e01d0aee 100644 --- a/compiler/rustc_const_eval/src/const_eval/machine.rs +++ b/compiler/rustc_const_eval/src/const_eval/machine.rs @@ -207,7 +207,7 @@ impl<'mir, 'tcx: 'mir> CompileTimeEvalContext<'mir, 'tcx> { ) -> InterpResult<'tcx, Option<ty::Instance<'tcx>>> { let def_id = instance.def_id(); - if Some(def_id) == self.tcx.lang_items().panic_display() + if self.tcx.has_attr(def_id, sym::rustc_const_panic_str) || Some(def_id) == self.tcx.lang_items().begin_panic_fn() { let args = self.copy_fn_args(args)?; |
