};
let join_block = this.cfg.start_new_block();
- this.cfg.terminate(
- then_blk,
- source_info,
- TerminatorKind::Goto { target: join_block },
- );
- this.cfg.terminate(
- else_blk,
- source_info,
- TerminatorKind::Goto { target: join_block },
- );
-
+ this.cfg.goto(then_blk, source_info, join_block);
+ this.cfg.goto(else_blk, source_info, join_block);
join_block.unit()
}
ExprKind::Let { expr, ref pat } => {
this.lower_let_expr(block, &this.thir[expr], pat, scope, expr_span)
});
- let join_block = this.cfg.start_new_block();
-
this.cfg.push_assign_constant(
true_block,
source_info,
},
);
+ let join_block = this.cfg.start_new_block();
this.cfg.goto(true_block, source_info, join_block);
this.cfg.goto(false_block, source_info, join_block);
join_block.unit()
let place_builder = place_builder.clone();
this.consume_by_copy_or_move(
place_builder
- .field(n, ty)
+ .field(n, *ty)
.into_place(this.tcx, this.typeck_results),
)
}
}
// These cases don't actually need a destination
- ExprKind::Assign { .. }
- | ExprKind::AssignOp { .. }
- | ExprKind::LlvmInlineAsm { .. } => {
+ ExprKind::Assign { .. } | ExprKind::AssignOp { .. } => {
unpack!(block = this.stmt_expr(block, expr, None));
this.cfg.push_assign_unit(block, source_info, destination, this.tcx);
block.unit()