Skip to content

Commit

Permalink
Duplicate allocations in lowering.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Dec 30, 2019
1 parent 4d77382 commit 8f05d12
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/librustc/hir/lowering/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
let stmt = this.stmt_let_pat(
stmt_attrs,
desugared_span,
Some(this.arena.alloc(expr)),
Some(expr),
parameter.pat,
hir::LocalSource::AsyncFn,
);
Expand Down Expand Up @@ -1152,7 +1152,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
let move_stmt = this.stmt_let_pat(
AttrVec::new(),
desugared_span,
Some(this.arena.alloc(move_expr)),
Some(move_expr),
move_pat,
hir::LocalSource::AsyncFn,
);
Expand All @@ -1163,7 +1163,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
let pattern_stmt = this.stmt_let_pat(
stmt_attrs,
desugared_span,
Some(this.arena.alloc(pattern_expr)),
Some(pattern_expr),
parameter.pat,
hir::LocalSource::AsyncFn,
);
Expand Down

0 comments on commit 8f05d12

Please sign in to comment.