Skip to content

Commit

Permalink
Cleanup the .await HIR lowering with .stmt(..).
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed May 11, 2019
1 parent af39a1f commit 362431b
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/librustc/hir/lowering.rs
Expand Up @@ -5647,11 +5647,7 @@ impl<'a> LoweringContext<'a> {
hir_vec![ready_arm, pending_arm],
hir::MatchSource::AwaitDesugar,
));
hir::Stmt {
hir_id: self.next_id(),
node: hir::StmtKind::Expr(match_expr),
span,
}
self.stmt(span, hir::StmtKind::Expr(match_expr))
};

let yield_stmt = {
Expand All @@ -5661,11 +5657,7 @@ impl<'a> LoweringContext<'a> {
hir::ExprKind::Yield(P(unit)),
ThinVec::new(),
));
hir::Stmt {
hir_id: self.next_id(),
node: hir::StmtKind::Expr(yield_expr),
span,
}
self.stmt(span, hir::StmtKind::Expr(yield_expr))
};

let loop_block = P(self.block_all(
Expand Down

0 comments on commit 362431b

Please sign in to comment.