Struct rustc_mir::borrow_check::type_check::relate_tys::NllTypeRelatingDelegate[−][src]

struct NllTypeRelatingDelegate<'me, 'bccx, 'tcx> {
    infcx: &'me InferCtxt<'me, 'tcx>,
    borrowck_context: Option<&'me mut BorrowCheckContext<'bccx, 'tcx>>,
    param_env: ParamEnv<'tcx>,
    locations: Locations,
    category: ConstraintCategory,
}

Fields

infcx: &'me InferCtxt<'me, 'tcx>borrowck_context: Option<&'me mut BorrowCheckContext<'bccx, 'tcx>>param_env: ParamEnv<'tcx>locations: Locations
Expand description

Where (and why) is this relation taking place?

category: ConstraintCategory
Expand description

What category do we assign the resulting 'a: 'b relationships?

Implementations

impl<'me, 'bccx, 'tcx> NllTypeRelatingDelegate<'me, 'bccx, 'tcx>[src]

fn new(
    infcx: &'me InferCtxt<'me, 'tcx>,
    borrowck_context: Option<&'me mut BorrowCheckContext<'bccx, 'tcx>>,
    param_env: ParamEnv<'tcx>,
    locations: Locations,
    category: ConstraintCategory
) -> Self
[src]

Trait Implementations

impl<'tcx> TypeRelatingDelegate<'tcx> for NllTypeRelatingDelegate<'_, '_, 'tcx>[src]

fn param_env(&self) -> ParamEnv<'tcx>[src]

fn create_next_universe(&mut self) -> UniverseIndex[src]

Creates a new universe index. Used when instantiating placeholders.

fn next_existential_region_var(&mut self, from_forall: bool) -> Region<'tcx>[src]

Creates a new region variable representing a higher-ranked region that is instantiated existentially. This creates an inference variable, typically. Read more

fn next_placeholder_region(
    &mut self,
    placeholder: PlaceholderRegion
) -> Region<'tcx>
[src]

Creates a new region variable representing a higher-ranked region that is instantiated universally. This creates a new region placeholder, typically. Read more

fn generalize_existential(&mut self, universe: UniverseIndex) -> Region<'tcx>[src]

Creates a new existential region in the given universe. This is used when handling subtyping and type variables – if we have that ?X <: Foo<'a>, for example, we would instantiate ?X with a type like Foo<'?0> where '?0 is a fresh existential variable created by this function. We would then relate Foo<'?0> with Foo<'a> (and probably add an outlives relation stating that '?0: 'a). Read more

fn push_outlives(&mut self, sup: Region<'tcx>, sub: Region<'tcx>)[src]

Push a constraint sup: sub – this constraint must be satisfied for the two types to be related. sub and sup may be regions from the type or new variables created through the delegate. Read more

fn const_equate(&mut self, _a: &'tcx Const<'tcx>, _b: &'tcx Const<'tcx>)[src]

fn normalization() -> NormalizationStrategy[src]

Define the normalization strategy to use, eager or lazy.

fn forbid_inference_vars() -> bool[src]

Enables some optimizations if we do not expect inference variables in the RHS of the relation. Read more

Auto Trait Implementations

impl<'me, 'bccx, 'tcx> !RefUnwindSafe for NllTypeRelatingDelegate<'me, 'bccx, 'tcx>

impl<'me, 'bccx, 'tcx> !Send for NllTypeRelatingDelegate<'me, 'bccx, 'tcx>

impl<'me, 'bccx, 'tcx> !Sync for NllTypeRelatingDelegate<'me, 'bccx, 'tcx>

impl<'me, 'bccx, 'tcx> Unpin for NllTypeRelatingDelegate<'me, 'bccx, 'tcx> where
    'bccx: 'me,
    'tcx: 'me, 

impl<'me, 'bccx, 'tcx> !UnwindSafe for NllTypeRelatingDelegate<'me, 'bccx, 'tcx>

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]