Rollup merge of #111952 - cjgillot:drop-replace, r=WaffleLapkin

Remove DesugaringKind::Replace.

A simple boolean flag is enough.
This commit is contained in:
Guillaume Gomez 2023-05-27 13:38:31 +02:00 committed by GitHub
commit be82095e1c

View File

@ -473,7 +473,7 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
| TerminatorKind::GeneratorDrop => {
bug!("shouldn't exist at codegen {:?}", bb_data.terminator());
}
TerminatorKind::Drop { place, target, unwind: _ } => {
TerminatorKind::Drop { place, target, unwind: _, replace: _ } => {
let drop_place = codegen_place(fx, *place);
crate::abi::codegen_drop(fx, source_info, drop_place);