From 86afea97fdc3e4c1c8ad441bd68f7988f660aba0 Mon Sep 17 00:00:00 2001 From: Waffle Maybe Date: Fri, 31 May 2024 00:46:07 +0200 Subject: [PATCH] Don't recompute `tail` in `lower_stmts` --- compiler/rustc_ast_lowering/src/block.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_ast_lowering/src/block.rs b/compiler/rustc_ast_lowering/src/block.rs index eef6e8280afbe..e821a08bf1817 100644 --- a/compiler/rustc_ast_lowering/src/block.rs +++ b/compiler/rustc_ast_lowering/src/block.rs @@ -76,7 +76,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { StmtKind::Empty => {} StmtKind::MacCall(..) => panic!("shouldn't exist here"), } - ast_stmts = &ast_stmts[1..]; + ast_stmts = tail; } (self.arena.alloc_from_iter(stmts), expr) }