Skip to content

Commit 96fd218

Browse files
committed
check if used_place and moved_place are equal when determining if the move was partial
1 parent 4e5eda3 commit 96fd218

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/librustc_mir/borrow_check/error_reporting.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,9 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
133133
let is_partial_move = move_site_vec.iter().any(|move_site| {
134134
let move_out = self.move_data.moves[(*move_site).moi];
135135
let moved_place = &self.move_data.move_paths[move_out.path].place;
136-
// dbg!(moved_place);
137-
// dbg!(used_place);
138-
// if used_place != moved_place {
136+
if used_place != moved_place {
139137
used_place.is_prefix_of(moved_place)
140-
// } else { false }
138+
} else { false }
141139
});
142140
for move_site in &move_site_vec {
143141
let move_out = self.move_data.moves[(*move_site).moi];

0 commit comments

Comments
 (0)