check if used_place
and moved_place
are equal when determining if the move was partial
This commit is contained in:
parent
4e5eda3697
commit
96fd2181ba
@ -133,11 +133,9 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
|
||||
let is_partial_move = move_site_vec.iter().any(|move_site| {
|
||||
let move_out = self.move_data.moves[(*move_site).moi];
|
||||
let moved_place = &self.move_data.move_paths[move_out.path].place;
|
||||
// dbg!(moved_place);
|
||||
// dbg!(used_place);
|
||||
// if used_place != moved_place {
|
||||
if used_place != moved_place {
|
||||
used_place.is_prefix_of(moved_place)
|
||||
// } else { false }
|
||||
} else { false }
|
||||
});
|
||||
for move_site in &move_site_vec {
|
||||
let move_out = self.move_data.moves[(*move_site).moi];
|
||||
|
Loading…
x
Reference in New Issue
Block a user