diff options
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/step.rs')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/step.rs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/step.rs b/compiler/rustc_const_eval/src/interpret/step.rs index 57ba9b40992..0701e0ded97 100644 --- a/compiler/rustc_const_eval/src/interpret/step.rs +++ b/compiler/rustc_const_eval/src/interpret/step.rs @@ -46,15 +46,12 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { return Ok(false); } - let loc = match self.frame().loc { - Ok(loc) => loc, - Err(_) => { - // We are unwinding and this fn has no cleanup code. - // Just go on unwinding. - trace!("unwinding: skipping frame"); - self.pop_stack_frame(/* unwinding */ true)?; - return Ok(true); - } + let Ok(loc) = self.frame().loc else { + // We are unwinding and this fn has no cleanup code. + // Just go on unwinding. + trace!("unwinding: skipping frame"); + self.pop_stack_frame(/* unwinding */ true)?; + return Ok(true); }; let basic_block = &self.body().basic_blocks()[loc.block]; |
