Remove DropAndReplace terminator
PR 107844 made DropAndReplace unused, let's remove it completely from the codebase.
This commit is contained in:
parent
14c54b637b
commit
c5d4e4d907
48 changed files with 33 additions and 341 deletions
|
@ -480,7 +480,6 @@ impl Direction for Forward {
|
|||
|
||||
Assert { target, cleanup: unwind, expected: _, msg: _, cond: _ }
|
||||
| Drop { target, unwind, place: _ }
|
||||
| DropAndReplace { target, unwind, value: _, place: _ }
|
||||
| FalseUnwind { real_target: target, unwind } => {
|
||||
if let Some(unwind) = unwind {
|
||||
propagate(unwind, exit_state);
|
||||
|
|
|
@ -111,8 +111,7 @@ where
|
|||
self.super_terminator(terminator, location);
|
||||
|
||||
match terminator.kind {
|
||||
mir::TerminatorKind::Drop { place: dropped_place, .. }
|
||||
| mir::TerminatorKind::DropAndReplace { place: dropped_place, .. } => {
|
||||
mir::TerminatorKind::Drop { place: dropped_place, .. } => {
|
||||
// Drop terminators may call custom drop glue (`Drop::drop`), which takes `&mut
|
||||
// self` as a parameter. In the general case, a drop impl could launder that
|
||||
// reference into the surrounding environment through a raw pointer, thus creating
|
||||
|
|
|
@ -202,7 +202,6 @@ impl<'mir, 'tcx> crate::GenKillAnalysis<'tcx> for MaybeRequiresStorage<'mir, 'tc
|
|||
TerminatorKind::Abort
|
||||
| TerminatorKind::Assert { .. }
|
||||
| TerminatorKind::Drop { .. }
|
||||
| TerminatorKind::DropAndReplace { .. }
|
||||
| TerminatorKind::FalseEdge { .. }
|
||||
| TerminatorKind::FalseUnwind { .. }
|
||||
| TerminatorKind::GeneratorDrop
|
||||
|
@ -240,7 +239,6 @@ impl<'mir, 'tcx> crate::GenKillAnalysis<'tcx> for MaybeRequiresStorage<'mir, 'tc
|
|||
| TerminatorKind::Abort
|
||||
| TerminatorKind::Assert { .. }
|
||||
| TerminatorKind::Drop { .. }
|
||||
| TerminatorKind::DropAndReplace { .. }
|
||||
| TerminatorKind::FalseEdge { .. }
|
||||
| TerminatorKind::FalseUnwind { .. }
|
||||
| TerminatorKind::GeneratorDrop
|
||||
|
|
|
@ -392,11 +392,6 @@ impl<'b, 'a, 'tcx> Gatherer<'b, 'a, 'tcx> {
|
|||
self.create_move_path(place);
|
||||
self.gather_init(place.as_ref(), InitKind::Deep);
|
||||
}
|
||||
TerminatorKind::DropAndReplace { place, ref value, .. } => {
|
||||
self.create_move_path(place);
|
||||
self.gather_operand(value);
|
||||
self.gather_init(place.as_ref(), InitKind::Deep);
|
||||
}
|
||||
TerminatorKind::Call {
|
||||
ref func,
|
||||
ref args,
|
||||
|
|
|
@ -230,7 +230,7 @@ pub trait ValueAnalysis<'tcx> {
|
|||
TerminatorKind::Drop { place, .. } => {
|
||||
state.flood_with(place.as_ref(), self.map(), Self::Value::bottom());
|
||||
}
|
||||
TerminatorKind::DropAndReplace { .. } | TerminatorKind::Yield { .. } => {
|
||||
TerminatorKind::Yield { .. } => {
|
||||
// They would have an effect, but are not allowed in this phase.
|
||||
bug!("encountered disallowed terminator");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue