1
Fork 0

Actually keep PlaceMention if requested.

This commit is contained in:
Camille GILLOT 2023-03-18 16:11:48 +00:00
parent ddfa2463e2
commit 2870d269f5
12 changed files with 45 additions and 23 deletions

View file

@ -757,14 +757,6 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
}
}
}
StatementKind::PlaceMention(..) => {
if self.mir_phase >= MirPhase::Runtime(RuntimePhase::Initial) {
self.fail(
location,
"`PlaceMention` should have been removed after drop lowering phase",
);
}
}
StatementKind::AscribeUserType(..) => {
if self.mir_phase >= MirPhase::Runtime(RuntimePhase::Initial) {
self.fail(
@ -874,6 +866,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
StatementKind::StorageDead(_)
| StatementKind::Coverage(_)
| StatementKind::ConstEvalCounter
| StatementKind::PlaceMention(..)
| StatementKind::Nop => {}
}