Auto merge of #116300 - cjgillot:split-move, r=petrochenkov
Separate move path tracking between borrowck and drop elaboration. The primary goal of this PR is to skip creating a `MovePathIndex` for path that do not need dropping in drop elaboration. The 2 first commits are cleanups. The next 2 commits displace `move` errors from move-path builder to borrowck. Move-path builder keeps the same logic, but does not carry error information any more. The remaining commits allow to filter `MovePathIndex` creation according to types. This is used in drop elaboration, to avoid computing dataflow for paths that do not need dropping.
This commit is contained in:
commit
cd674d6179
19 changed files with 581 additions and 559 deletions
|
@ -2633,9 +2633,10 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
|
|||
/* Check if the mpi is initialized as an argument */
|
||||
let mut is_argument = false;
|
||||
for arg in self.body.args_iter() {
|
||||
let path = self.move_data.rev_lookup.find_local(arg);
|
||||
if mpis.contains(&path) {
|
||||
is_argument = true;
|
||||
if let Some(path) = self.move_data.rev_lookup.find_local(arg) {
|
||||
if mpis.contains(&path) {
|
||||
is_argument = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue