@@ -169,10 +169,8 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
169
169
}
170
170
171
171
Drop { place, target, unwind, replace : _ } => {
172
- let frame = self . frame ( ) ;
173
- let ty = place. ty ( & frame. body . local_decls , * self . tcx ) . ty ;
174
- let ty = self . instantiate_from_frame_and_normalize_erasing_regions ( frame, ty) ?;
175
- let instance = Instance :: resolve_drop_in_place ( * self . tcx , ty) ;
172
+ let place = self . eval_place ( place) ?;
173
+ let instance = Instance :: resolve_drop_in_place ( * self . tcx , place. layout . ty ) ;
176
174
if let ty:: InstanceDef :: DropGlue ( _, None ) = instance. def {
177
175
// This is the branch we enter if and only if the dropped type has no drop glue
178
176
// whatsoever. This can happen as a result of monomorphizing a drop of a
@@ -181,8 +179,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
181
179
self . go_to_block ( target) ;
182
180
return Ok ( ( ) ) ;
183
181
}
184
- let place = self . eval_place ( place) ?;
185
- trace ! ( "TerminatorKind::drop: {:?}, type {}" , place, ty) ;
182
+ trace ! ( "TerminatorKind::drop: {:?}, type {}" , place, place. layout. ty) ;
186
183
self . drop_in_place ( & place, instance, target, unwind) ?;
187
184
}
188
185
0 commit comments