Rollup merge of #111952 - cjgillot:drop-replace, r=WaffleLapkin
Remove DesugaringKind::Replace. A simple boolean flag is enough.
This commit is contained in:
commit
ddb5424569
26 changed files with 78 additions and 82 deletions
|
@ -237,6 +237,7 @@ where
|
|||
place: self.place,
|
||||
target: self.succ,
|
||||
unwind: self.unwind.into_action(),
|
||||
replace: false,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
@ -719,6 +720,7 @@ where
|
|||
place: tcx.mk_place_deref(ptr),
|
||||
target: loop_block,
|
||||
unwind: unwind.into_action(),
|
||||
replace: false,
|
||||
},
|
||||
);
|
||||
|
||||
|
@ -963,8 +965,12 @@ where
|
|||
}
|
||||
|
||||
fn drop_block(&mut self, target: BasicBlock, unwind: Unwind) -> BasicBlock {
|
||||
let block =
|
||||
TerminatorKind::Drop { place: self.place, target, unwind: unwind.into_action() };
|
||||
let block = TerminatorKind::Drop {
|
||||
place: self.place,
|
||||
target,
|
||||
unwind: unwind.into_action(),
|
||||
replace: false,
|
||||
};
|
||||
self.new_block(unwind, block)
|
||||
}
|
||||
|
||||
|
|
|
@ -479,7 +479,7 @@ impl Direction for Forward {
|
|||
Goto { target } => propagate(target, exit_state),
|
||||
|
||||
Assert { target, unwind, expected: _, msg: _, cond: _ }
|
||||
| Drop { target, unwind, place: _ }
|
||||
| Drop { target, unwind, place: _, replace: _ }
|
||||
| FalseUnwind { real_target: target, unwind } => {
|
||||
if let UnwindAction::Cleanup(unwind) = unwind {
|
||||
propagate(unwind, exit_state);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue