Struct rustc_trait_selection::infer::nll_relate::TypeRelating[−][src]

pub struct TypeRelating<'me, 'tcx, D> where
    D: TypeRelatingDelegate<'tcx>, 
{ infcx: &'me InferCtxt<'me, 'tcx>, delegate: D, ambient_variance: Variance, a_scopes: Vec<BoundRegionScope<'tcx>, Global>, b_scopes: Vec<BoundRegionScope<'tcx>, Global>, }

Fields

infcx: &'me InferCtxt<'me, 'tcx>delegate: D
Expand description

Callback to use when we deduce an outlives relationship.

ambient_variance: Variance
Expand description

How are we relating a and b?

  • Covariant means a <: b.
  • Contravariant means b <: a.
  • Invariant means `a == b.
  • Bivariant means that it doesn’t matter.
a_scopes: Vec<BoundRegionScope<'tcx>, Global>
Expand description

When we pass through a set of binders (e.g., when looking into a fn type), we push a new bound region scope onto here. This will contain the instantiated region for each region in those binders. When we then encounter a ReLateBound(d, br), we can use the De Bruijn index d to find the right scope, and then bound region name br to find the specific instantiation from within that scope. See replace_bound_region.

This field stores the instantiations for late-bound regions in the a type.

b_scopes: Vec<BoundRegionScope<'tcx>, Global>
Expand description

Same as a_scopes, but for the b type.

Auto Trait Implementations

impl<'me, 'tcx, D> !RefUnwindSafe for TypeRelating<'me, 'tcx, D>

impl<'me, 'tcx, D> !Send for TypeRelating<'me, 'tcx, D>

impl<'me, 'tcx, D> !Sync for TypeRelating<'me, 'tcx, D>

impl<'me, 'tcx, D> Unpin for TypeRelating<'me, 'tcx, D> where
    D: Unpin,
    'tcx: 'me, 

impl<'me, 'tcx, D> !UnwindSafe for TypeRelating<'me, 'tcx, D>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

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]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

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]