1
Fork 0

Rollup merge of #108856 - Zeegomo:remove-drop-and-rep, r=tmiasko

Remove DropAndReplace terminator

#107844 made DropAndReplace unused, let's remove it completely from the codebase.
This commit is contained in:
Matthias Krüger 2023-03-08 21:26:51 +01:00 committed by GitHub
commit 4e84fbf8a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
48 changed files with 33 additions and 344 deletions

View file

@ -808,8 +808,7 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirNeighborCollector<'a, 'tcx> {
let callee_ty = self.monomorphize(callee_ty);
visit_fn_use(self.tcx, callee_ty, true, source, &mut self.output)
}
mir::TerminatorKind::Drop { ref place, .. }
| mir::TerminatorKind::DropAndReplace { ref place, .. } => {
mir::TerminatorKind::Drop { ref place, .. } => {
let ty = place.ty(self.body, self.tcx).ty;
let ty = self.monomorphize(ty);
visit_drop_use(self.tcx, ty, true, source, self.output);