Use Place directly on place_contents_drop_state_cannot_differ, it's Copy

This commit is contained in:
Santiago Pastorino 2020-03-31 14:20:42 -03:00
parent 5987b0f8be
commit 947c1dcf92
No known key found for this signature in database
GPG Key ID: 8131A24E0C79EFAF

View File

@ -49,7 +49,7 @@ where
fn place_contents_drop_state_cannot_differ<'tcx>(
tcx: TyCtxt<'tcx>,
body: &Body<'tcx>,
place: &mir::Place<'tcx>,
place: mir::Place<'tcx>,
) -> bool {
let ty = place.ty(body, tcx).ty;
match ty.kind {
@ -110,7 +110,7 @@ pub(crate) fn on_all_children_bits<'tcx, F>(
move_data: &MoveData<'tcx>,
path: MovePathIndex,
) -> bool {
place_contents_drop_state_cannot_differ(tcx, body, &move_data.move_paths[path].place)
place_contents_drop_state_cannot_differ(tcx, body, move_data.move_paths[path].place)
}
fn on_all_children_bits<'tcx, F>(