Skip to content

Commit

Permalink
Rollup merge of rust-lang#108856 - Zeegomo:remove-drop-and-rep, r=tmi…
Browse files Browse the repository at this point in the history
…asko

Remove DropAndReplace terminator

rust-lang#107844 made DropAndReplace unused, let's remove it completely from the codebase.
  • Loading branch information
matthiaskrgr authored Mar 8, 2023
2 parents 792933c + bd84d88 commit 2ad8e1f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,6 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
TerminatorKind::Yield { .. }
| TerminatorKind::FalseEdge { .. }
| TerminatorKind::FalseUnwind { .. }
| TerminatorKind::DropAndReplace { .. }
| TerminatorKind::GeneratorDrop => {
bug!("shouldn't exist at codegen {:?}", bb_data.terminator());
}
Expand Down
3 changes: 1 addition & 2 deletions src/constant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,7 @@ pub(crate) fn mir_operand_get_const_val<'tcx>(
| TerminatorKind::Unreachable
| TerminatorKind::Drop { .. }
| TerminatorKind::Assert { .. } => {}
TerminatorKind::DropAndReplace { .. }
| TerminatorKind::Yield { .. }
TerminatorKind::Yield { .. }
| TerminatorKind::GeneratorDrop
| TerminatorKind::FalseEdge { .. }
| TerminatorKind::FalseUnwind { .. } => unreachable!(),
Expand Down

0 comments on commit 2ad8e1f

Please sign in to comment.