Make PlaceRef lifetimes of move_path_closest_to be both 'tcx

This commit is contained in:
Santiago Pastorino 2020-03-04 14:02:11 -03:00
parent 6200f5c362
commit e32ee55a36
No known key found for this signature in database
GPG Key ID: 8131A24E0C79EFAF

View File

@ -1713,8 +1713,8 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
/// static variable, as we do not track those in the MoveData.
fn move_path_closest_to(
&mut self,
place: PlaceRef<'_, 'tcx>,
) -> (PlaceRef<'cx, 'tcx>, MovePathIndex) {
place: PlaceRef<'tcx, 'tcx>,
) -> (PlaceRef<'tcx, 'tcx>, MovePathIndex) {
match self.move_data.rev_lookup.find(place) {
LookupResult::Parent(Some(mpi)) | LookupResult::Exact(mpi) => {
(self.move_data.move_paths[mpi].place.as_ref(), mpi)