fn move_path_closest_to(
        &mut self,
        place: &Place<'tcx>,
    ) -> Result<MovePathIndex, NoMovePathFound> {
        let mut last_prefix = place;
        for prefix in self.prefixes(place, PrefixSet::All) {
            if let Some(mpi) = self.move_path_for_place(prefix) {
                return Ok(mpi);
            }
            last_prefix = prefix;
        }
        match *last_prefix {
            Place::Local(_) => panic!("should have move path for every Local"),
            Place::Projection(_) => panic!("PrefixSet::All meant don't stop for Projection"),
            Place::Promoted(_) |
            Place::Static(_) => return Err(NoMovePathFound::ReachedStatic),
        }
    }
/// Currently MoveData does not store entries for all places in
/// the input MIR. For example it will currently filter out
/// places that are Copy; thus we do not track places of shared
/// reference type. This routine will walk up a place along its
/// prefixes, searching for a foundational place that *is*
/// tracked in the MoveData.
///
/// An Err result includes a tag indicated why the search failed.
/// Currently this can only occur if the place is built off of a
/// static variable, as we do not track those in the MoveData.
Currently MoveData does not store entries for all places in
the input MIR. For example it will currently filter out
places that are Copy; thus we do not track places of shared
reference type. This routine will walk up a place along its
prefixes, searching for a foundational place that *is
tracked in the MoveData.

An Err result includes a tag indicated why the search failed.
Currently this can only occur if the place is built off of a
static variable, as we do not track those in the MoveData.
Currently MoveData does not store entries for all places in the input MIR . For example it will currently filter out places that are Copy ; thus we do not track places of shared reference type . This routine will walk up a place along its prefixes searching for a foundational place that * is tracked in the MoveData . An Err result includes a tag indicated why the search failed . Currently this can only occur if the place is built off of a static variable as we do not track those in the MoveData .
fn move_path_closest_to(
        &mut self,
        place: &Place<'tcx>,
    ) -> Result<MovePathIndex, NoMovePathFound> {
        let mut last_prefix = place;
        for prefix in self.prefixes(place, PrefixSet::All) {
            if let Some(mpi) = self.move_path_for_place(prefix) {
                return Ok(mpi);
            }
            last_prefix = prefix;
        }
        match *last_prefix {
            Place::Local(_) => panic!("should have move path for every Local"),
            Place::Projection(_) => panic!("PrefixSet::All meant don't stop for Projection"),
            Place::Promoted(_) |
            Place::Static(_) => return Err(NoMovePathFound::ReachedStatic),
        }
    }
fn move_path_closest_to ( & mut self , place : & Place < ' tcx > , ) -> Result < MovePathIndex , NoMovePathFound > { let mut last_prefix = place ; for prefix in self . prefixes ( place , PrefixSet :: All ) { if let Some ( mpi ) = self . move_path_for_place ( prefix ) { return Ok ( mpi ) ; } last_prefix = prefix ; } match * last_prefix { Place :: Local ( _ ) => panic ! ( " " ) , Place :: Projection ( _ ) => panic ! ( " " ) , Place :: Promoted ( _ ) | Place :: Static ( _ ) => return Err ( NoMovePathFound :: ReachedStatic ) , } }
Currently MoveData does not store entries for all places in
the input MIR.
Currently MoveData does not store entries for all places in the input MIR .
&mut self
place
&Place<'tcx>
&mut self
place
&Place<'tcx>