Skip to content

Commit 5490cc1

Browse files
authored
Rollup merge of #60733 - Centril:cleanup-lowering-await, r=varkor
Cleanup the .await HIR lowering with .stmt(..). r? @cramertj
2 parents e19ad45 + 362431b commit 5490cc1

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/librustc/hir/lowering.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5647,11 +5647,7 @@ impl<'a> LoweringContext<'a> {
56475647
hir_vec![ready_arm, pending_arm],
56485648
hir::MatchSource::AwaitDesugar,
56495649
));
5650-
hir::Stmt {
5651-
hir_id: self.next_id(),
5652-
node: hir::StmtKind::Expr(match_expr),
5653-
span,
5654-
}
5650+
self.stmt(span, hir::StmtKind::Expr(match_expr))
56555651
};
56565652

56575653
let yield_stmt = {
@@ -5661,11 +5657,7 @@ impl<'a> LoweringContext<'a> {
56615657
hir::ExprKind::Yield(P(unit)),
56625658
ThinVec::new(),
56635659
));
5664-
hir::Stmt {
5665-
hir_id: self.next_id(),
5666-
node: hir::StmtKind::Expr(yield_expr),
5667-
span,
5668-
}
5660+
self.stmt(span, hir::StmtKind::Expr(yield_expr))
56695661
};
56705662

56715663
let loop_block = P(self.block_all(

0 commit comments

Comments
 (0)