[−][src]Struct rustc_mir::borrow_check::type_check::liveness::trace::LivenessContext
Contextual state for the type-liveness generator.
Fields
typeck: &'me mut TypeChecker<'typeck, 'tcx>Current type-checker, giving us our inference context etc.
elements: &'me RegionValueElementsDefines the PointIndex mapping
body: &'me Body<'tcx>MIR we are analyzing.
move_data: &'me MoveData<'tcx>Mapping to/from the various indices used for initialization tracking.
drop_data: FxHashMap<Ty<'tcx>, DropData<'tcx>>Cache for the results of dropck_outlives query.
flow_inits: &'me mut ResultsCursor<'flow, 'tcx, MaybeInitializedPlaces<'flow, 'tcx>>Results of dataflow tracking which variables (and paths) have been initialized.
local_use_map: &'me LocalUseMapIndex indicating where each variable is assigned, used, or dropped.
Implementations
impl<'_, '_, '_, 'tcx> LivenessContext<'_, '_, '_, 'tcx>[src]
pub(in borrow_check::type_check::liveness::trace) fn initialized_at_curr_loc(
&self,
mpi: MovePathIndex
) -> bool[src]
&self,
mpi: MovePathIndex
) -> bool
Returns true if the local variable (or some part of it) is initialized at the current
cursor position. Callers should call one of the seek methods immediately before to point
the cursor to the desired location.
pub(in borrow_check::type_check::liveness::trace) fn initialized_at_terminator(
&mut self,
block: BasicBlock,
mpi: MovePathIndex
) -> bool[src]
&mut self,
block: BasicBlock,
mpi: MovePathIndex
) -> bool
Returns true if the local variable (or some part of it) is initialized in
the terminator of block. We need to check this to determine if a
DROP of some local variable will have an effect -- note that
drops, as they may unwind, are always terminators.
pub(in borrow_check::type_check::liveness::trace) fn initialized_at_exit(
&mut self,
block: BasicBlock,
mpi: MovePathIndex
) -> bool[src]
&mut self,
block: BasicBlock,
mpi: MovePathIndex
) -> bool
Returns true if the path mpi (or some part of it) is initialized at
the exit of block.
Warning: Does not account for the result of Call
instructions.
pub(in borrow_check::type_check::liveness::trace) fn add_use_live_facts_for(
&mut self,
value: impl TypeFoldable<'tcx>,
live_at: &HybridBitSet<PointIndex>
)[src]
&mut self,
value: impl TypeFoldable<'tcx>,
live_at: &HybridBitSet<PointIndex>
)
Stores the result that all regions in value are live for the
points live_at.
pub(in borrow_check::type_check::liveness::trace) fn add_drop_live_facts_for(
&mut self,
dropped_local: Local,
dropped_ty: Ty<'tcx>,
drop_locations: &[Location],
live_at: &HybridBitSet<PointIndex>
)[src]
&mut self,
dropped_local: Local,
dropped_ty: Ty<'tcx>,
drop_locations: &[Location],
live_at: &HybridBitSet<PointIndex>
)
Some variable with type live_ty is "drop live" at location
-- i.e., it may be dropped later. This means that some of
the regions in its type must be live at location. The
precise set will depend on the dropck constraints, and in
particular this takes #[may_dangle] into account.
pub(in borrow_check::type_check::liveness::trace) fn make_all_regions_live(
elements: &RegionValueElements,
typeck: &mut TypeChecker<'_, 'tcx>,
value: impl TypeFoldable<'tcx>,
live_at: &HybridBitSet<PointIndex>
)[src]
elements: &RegionValueElements,
typeck: &mut TypeChecker<'_, 'tcx>,
value: impl TypeFoldable<'tcx>,
live_at: &HybridBitSet<PointIndex>
)
pub(in borrow_check::type_check::liveness::trace) fn compute_drop_data(
typeck: &mut TypeChecker<'_, 'tcx>,
dropped_ty: Ty<'tcx>
) -> DropData<'tcx>[src]
typeck: &mut TypeChecker<'_, 'tcx>,
dropped_ty: Ty<'tcx>
) -> DropData<'tcx>
Auto Trait Implementations
impl<'me, 'typeck, 'flow, 'tcx> !RefUnwindSafe for LivenessContext<'me, 'typeck, 'flow, 'tcx>
impl<'me, 'typeck, 'flow, 'tcx> !Send for LivenessContext<'me, 'typeck, 'flow, 'tcx>
impl<'me, 'typeck, 'flow, 'tcx> !Sync for LivenessContext<'me, 'typeck, 'flow, 'tcx>
impl<'me, 'typeck, 'flow, 'tcx> Unpin for LivenessContext<'me, 'typeck, 'flow, 'tcx> where
'flow: 'me,
'tcx: 'me,
'typeck: 'me,
'flow: 'me,
'tcx: 'me,
'typeck: 'me,
impl<'me, 'typeck, 'flow, 'tcx> !UnwindSafe for LivenessContext<'me, 'typeck, 'flow, 'tcx>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.