Skip to content

Commit 362431b

Browse files
committed
Cleanup the .await HIR lowering with .stmt(..).
1 parent af39a1f commit 362431b

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)