]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_const_eval/src/interpret/step.rs
Rollup merge of #94818 - yoshuawuyts:into-future-associated-type, r=joshtriplett
[rust.git] / compiler / rustc_const_eval / src / interpret / step.rs
index 57ba9b4099232f0c7719b9781748e0c23c179c14..0701e0ded9703f89a2af1cb0fd746fe192168f77 100644 (file)
@@ -46,15 +46,12 @@ pub fn step(&mut self) -> InterpResult<'tcx, bool> {
             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];