1
Fork 0

Avoid using a magic value for untracked locals.

This commit is contained in:
Camille GILLOT 2023-10-12 17:19:19 +00:00
parent 8d535070a2
commit 90e6d29955
6 changed files with 41 additions and 31 deletions

View file

@ -2611,9 +2611,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;
}
}
}