diff --git a/compiler/rustc_ast_lowering/src/expr.rs b/compiler/rustc_ast_lowering/src/expr.rs index 80633e141fc6..16cd7a0bcdd3 100644 --- a/compiler/rustc_ast_lowering/src/expr.rs +++ b/compiler/rustc_ast_lowering/src/expr.rs @@ -1186,9 +1186,7 @@ fn lower_loop_destination(&mut self, destination: Option<(NodeId, Label)>) -> hi } } None => self - .loop_scopes - .last() - .cloned() + .loop_scope .map(|id| Ok(self.lower_node_id(id))) .unwrap_or(Err(hir::LoopIdError::OutsideLoopScope)), }; @@ -1208,18 +1206,9 @@ fn lower_jump_destination(&mut self, id: NodeId, opt_label: Option