Put deaggregated statements after original constant.
This commit is contained in:
@@ -318,6 +318,8 @@ impl<'tcx, 'll> MutVisitor<'tcx> for ReplacementVisitor<'tcx, 'll> {
|
||||
// ConstProp will pick up the pieces and replace them by actual constants.
|
||||
StatementKind::Assign(box (place, Rvalue::Use(Operand::Constant(_)))) => {
|
||||
if let Some(final_locals) = self.replacements.place_fragments(place) {
|
||||
// Put the deaggregated statements *after* the original one.
|
||||
let location = location.successor_within_block();
|
||||
for (field, ty, new_local) in final_locals {
|
||||
let rplace = self.tcx.mk_place_field(place, field, ty);
|
||||
let rvalue = Rvalue::Use(Operand::Move(rplace));
|
||||
|
||||
Reference in New Issue
Block a user