mir/borrowck: remove redundant returns
This commit is contained in:
parent
cd03f5d1e0
commit
f53d2b257c
1 changed files with 6 additions and 6 deletions
|
@ -1589,7 +1589,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
|
||||||
Place::Local(_) => panic!("should have move path for every Local"),
|
Place::Local(_) => panic!("should have move path for every Local"),
|
||||||
Place::Projection(_) => panic!("PrefixSet::All meant don't stop for Projection"),
|
Place::Projection(_) => panic!("PrefixSet::All meant don't stop for Projection"),
|
||||||
Place::Promoted(_) |
|
Place::Promoted(_) |
|
||||||
Place::Static(_) => return Err(NoMovePathFound::ReachedStatic),
|
Place::Static(_) => Err(NoMovePathFound::ReachedStatic),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1881,7 +1881,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// at this point, we have set up the error reporting state.
|
// at this point, we have set up the error reporting state.
|
||||||
if previously_initialized {
|
return if previously_initialized {
|
||||||
self.report_mutability_error(
|
self.report_mutability_error(
|
||||||
place,
|
place,
|
||||||
span,
|
span,
|
||||||
|
@ -1889,10 +1889,10 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
|
||||||
error_access,
|
error_access,
|
||||||
location,
|
location,
|
||||||
);
|
);
|
||||||
return true;
|
true
|
||||||
} else {
|
} else {
|
||||||
return false;
|
false
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_local_ever_initialized(&self,
|
fn is_local_ever_initialized(&self,
|
||||||
|
@ -1907,7 +1907,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
|
||||||
return Some(index);
|
return Some(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return None;
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Adds the place into the used mutable variables set
|
/// Adds the place into the used mutable variables set
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue