Skip to content

Commit

Permalink
Remove DropAndReplace terminator
Browse files Browse the repository at this point in the history
PR 107844 made DropAndReplace unused, let's remove it completely
from the codebase.
  • Loading branch information
zeegomo committed Mar 7, 2023
1 parent 1b57cb6 commit bd84d88
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 bd84d88

Please sign in to comment.