Struct rustc_trait_selection::traits::fulfill::DrainProcessor
source · struct DrainProcessor<'a, 'tcx> {
infcx: &'a InferCtxt<'tcx>,
removed_predicates: Vec<PredicateObligation<'tcx>>,
}Fields§
§infcx: &'a InferCtxt<'tcx>§removed_predicates: Vec<PredicateObligation<'tcx>>Trait Implementations§
source§impl<'tcx> ObligationProcessor for DrainProcessor<'_, 'tcx>
impl<'tcx> ObligationProcessor for DrainProcessor<'_, 'tcx>
type Obligation = PendingPredicateObligation<'tcx>
type Error = !
type OUT = Outcome<PendingPredicateObligation<'tcx>, !>
fn needs_process_obligation( &self, pending_obligation: &Self::Obligation ) -> bool
fn process_obligation( &mut self, pending_obligation: &mut PendingPredicateObligation<'tcx> ) -> ProcessResult<PendingPredicateObligation<'tcx>, !>
source§fn process_backedge<'c, I>(
&mut self,
cycle: I,
_marker: PhantomData<&'c PendingPredicateObligation<'tcx>>
) -> Result<(), !>where
I: Clone + Iterator<Item = &'c PendingPredicateObligation<'tcx>>,
fn process_backedge<'c, I>( &mut self, cycle: I, _marker: PhantomData<&'c PendingPredicateObligation<'tcx>> ) -> Result<(), !>where I: Clone + Iterator<Item = &'c PendingPredicateObligation<'tcx>>,
As we do the cycle check, we invoke this callback when we
encounter an actual cycle.
cycle is an iterator that starts
at the start of the cycle in the stack and walks toward the
top. Read moresource§fn skippable_obligations<'a>(
&'a self,
_it: impl Iterator<Item = &'a Self::Obligation>
) -> usize
fn skippable_obligations<'a>( &'a self, _it: impl Iterator<Item = &'a Self::Obligation> ) -> usize
Implementations can provide a fast-path to obligation-processing
by counting the prefix of the passed iterator for which
needs_process_obligation would return false.Auto Trait Implementations§
impl<'a, 'tcx> !RefUnwindSafe for DrainProcessor<'a, 'tcx>
impl<'a, 'tcx> !Send for DrainProcessor<'a, 'tcx>
impl<'a, 'tcx> !Sync for DrainProcessor<'a, 'tcx>
impl<'a, 'tcx> Unpin for DrainProcessor<'a, 'tcx>where 'tcx: 'a,
impl<'a, 'tcx> !UnwindSafe for DrainProcessor<'a, '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
Mutably borrows from an owned value. Read more
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: 32 bytes