Struct rustc_infer::infer::undo_log::InferCtxtUndoLogs [−][src]
Expand description
The combined undo log for all the various unification tables. For each change to the storage for any kind of inference variable, we record an UndoLog entry in the vector here.
Fields
logs: Vec<UndoLog<'tcx>>num_open_snapshots: usizeImplementations
impl<'tcx> InferCtxtUndoLogs<'tcx>[src]
impl<'tcx> InferCtxtUndoLogs<'tcx>[src]pub fn start_snapshot(&mut self) -> Snapshot<'tcx>[src]
pub(crate) fn region_constraints_in_snapshot(
&self,
s: &Snapshot<'tcx>
) -> impl Iterator<Item = &UndoLog<'tcx>> + Clone[src]
&self,
s: &Snapshot<'tcx>
) -> impl Iterator<Item = &UndoLog<'tcx>> + Clone
pub(crate) fn region_constraints(
&self
) -> impl Iterator<Item = &UndoLog<'tcx>> + Clone[src]
&self
) -> impl Iterator<Item = &UndoLog<'tcx>> + Clone
fn assert_open_snapshot(&self, snapshot: &Snapshot<'tcx>)[src]
Trait Implementations
impl Default for InferCtxtUndoLogs<'_>[src]
impl Default for InferCtxtUndoLogs<'_>[src]impl<'tcx> Index<usize> for InferCtxtUndoLogs<'tcx>[src]
impl<'tcx> Index<usize> for InferCtxtUndoLogs<'tcx>[src]impl<'tcx> IndexMut<usize> for InferCtxtUndoLogs<'tcx>[src]
impl<'tcx> IndexMut<usize> for InferCtxtUndoLogs<'tcx>[src]impl<'tcx, T> UndoLogs<T> for InferCtxtUndoLogs<'tcx> where
UndoLog<'tcx>: From<T>, [src]
impl<'tcx, T> UndoLogs<T> for InferCtxtUndoLogs<'tcx> where
UndoLog<'tcx>: From<T>, [src]The UndoLogs trait defines how we undo a particular kind of action (of type T). We can undo any action that is convertable into a UndoLog (per the From impls above).
fn num_open_snapshots(&self) -> usize[src]
fn num_open_snapshots(&self) -> usize[src]How many open snapshots this undo log currently has
fn push(&mut self, undo: T)[src]
fn push(&mut self, undo: T)[src]Pushes a new “undo item” onto the undo log. This method is invoked when some action is taken (e.g., a variable is unified). It records the info needed to reverse that action should an enclosing snapshot be rolleod back. Read more
fn extend<J>(&mut self, undos: J) where
Self: Sized,
J: IntoIterator<Item = T>, [src]
fn extend<J>(&mut self, undos: J) where
Self: Sized,
J: IntoIterator<Item = T>, [src]Extends the undo log with many undos.
fn in_snapshot(&self) -> bool
fn in_snapshot(&self) -> boolTrue if a snapshot has started, false otherwise
Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for InferCtxtUndoLogs<'tcx>
impl<'tcx> !Send for InferCtxtUndoLogs<'tcx>
impl<'tcx> !Sync for InferCtxtUndoLogs<'tcx>
impl<'tcx> Unpin for InferCtxtUndoLogs<'tcx>
impl<'tcx> !UnwindSafe for InferCtxtUndoLogs<'tcx>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> WithConstness for T[src]
impl<T> WithConstness for T[src]fn with_constness(self, constness: Constness) -> ConstnessAnd<Self>[src]
fn with_const(self) -> ConstnessAnd<Self>[src]
fn without_const(self) -> ConstnessAnd<Self>[src]
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,