Skip to content

Commit

Permalink
Rollup merge of #125790 - WaffleLapkin:no-tail-recomputation-in-lower…
Browse files Browse the repository at this point in the history
…-stmts, r=lcnr

Don't recompute `tail` in `lower_stmts`

Does not really matter, but this is slightly nicer.

`@bors` rollup
  • Loading branch information
matthiaskrgr authored May 31, 2024
2 parents ab55d42 + 86afea9 commit c11e057
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_ast_lowering/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit c11e057

Please sign in to comment.