pub struct MoveData<'tcx> {
pub move_paths: IndexVec<MovePathIndex, MovePath<'tcx>>,
pub move_outs: IndexVec<MoveOutIndex, MoveOut>,
pub move_out_loc_map: LocationMap<SmallVec<[MoveOutIndex; 4]>>,
pub move_out_path_map: IndexVec<MovePathIndex, SmallVec<[MoveOutIndex; 4]>>,
pub rev_lookup: MovePathLookup<'tcx>,
pub inits: IndexVec<InitIndex, Init>,
pub init_loc_map: LocationMap<SmallVec<[InitIndex; 1]>>,
pub init_path_map: IndexVec<MovePathIndex, SmallVec<[InitIndex; 4]>>,
}Fields§
§move_paths: IndexVec<MovePathIndex, MovePath<'tcx>>All the gathered MovePaths.
move_outs: IndexVec<MoveOutIndex, MoveOut>All the MoveOuts.
move_out_loc_map: LocationMap<SmallVec<[MoveOutIndex; 4]>>Map from locations to MoveOuts. SmallVec because each location might cause more than
one MoveOut. Used during analysis and diagnostics.
move_out_path_map: IndexVec<MovePathIndex, SmallVec<[MoveOutIndex; 4]>>Map from MovePaths (places) to MoveOuts. SmallVec because each MovePath may be
moved-out of more than once. Used mostly for diagnostics.
rev_lookup: MovePathLookup<'tcx>Map from places/locals to MovePaths.
inits: IndexVec<InitIndex, Init>All the Inits.
init_loc_map: LocationMap<SmallVec<[InitIndex; 1]>>Map from locations to Inits. SmallVec because each location might cause more than one
Init, though more than one is very rare (e.g. inline asm).
init_path_map: IndexVec<MovePathIndex, SmallVec<[InitIndex; 4]>>Map from MovePaths (places) to Inits. SmallVec because each MovePath (place) might
be inited more than once.
Implementations§
Source§impl<'tcx> MoveData<'tcx>
impl<'tcx> MoveData<'tcx>
pub fn gather_moves( body: &Body<'tcx>, tcx: TyCtxt<'tcx>, filter: impl Fn(Ty<'tcx>) -> bool, ) -> MoveData<'tcx>
Sourcepub fn base_local(&self, mpi: MovePathIndex) -> Local
pub fn base_local(&self, mpi: MovePathIndex) -> Local
For the move path mpi, returns the root local variable that starts the path.
(e.g., for a path like a.b.c returns a)
pub fn find_in_move_path_or_its_descendants( &self, root: MovePathIndex, pred: impl Fn(MovePathIndex) -> bool, ) -> Option<MovePathIndex>
Trait Implementations§
Auto Trait Implementations§
impl<'tcx> !RefUnwindSafe for MoveData<'tcx>
impl<'tcx> !UnwindSafe for MoveData<'tcx>
impl<'tcx> DynSend for MoveData<'tcx>
impl<'tcx> DynSync for MoveData<'tcx>
impl<'tcx> Freeze for MoveData<'tcx>
impl<'tcx> Send for MoveData<'tcx>
impl<'tcx> Sync for MoveData<'tcx>
impl<'tcx> Unpin for MoveData<'tcx>
impl<'tcx> UnsafeUnpin for MoveData<'tcx>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<K> IntoQueryKey<K> for K
impl<K> IntoQueryKey<K> for K
Source§fn into_query_key(self) -> K
fn into_query_key(self) -> K
Self to K.
This should always be a very cheap conversion, e.g. LocalDefId::to_def_id.Source§impl<T> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
Source§impl<I, T> UpcastFrom<I, T> for T
impl<I, T> UpcastFrom<I, T> for T
fn upcast_from(from: T, _tcx: I) -> T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
Source§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 256 bytes