Avoid using a magic value for untracked locals.
This commit is contained in:
parent
8d535070a2
commit
90e6d29955
6 changed files with 41 additions and 31 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue