pub type CanonicalTyGoal<'tcx> = Canonical<'tcx, ParamEnvAnd<'tcx, Ty<'tcx>>>;

Aliased Type§

struct CanonicalTyGoal<'tcx> {
    pub value: ParamEnvAnd<'tcx, Ty<'tcx>>,
    pub max_universe: UniverseIndex,
    pub variables: &'tcx List<CanonicalVarInfo<'tcx>>,
}

Fields§

§value: ParamEnvAnd<'tcx, Ty<'tcx>>§max_universe: UniverseIndex§variables: &'tcx List<CanonicalVarInfo<'tcx>>

Trait Implementations§

source§

impl<'tcx, V> CanonicalExt<'tcx, V> for Canonical<'tcx, V>

source§

fn substitute( &self, tcx: TyCtxt<'tcx>, var_values: &CanonicalVarValues<'tcx> ) -> Vwhere V: TypeFoldable<TyCtxt<'tcx>>,

Instantiate the wrapped value, replacing each canonical value with the value given in var_values.
source§

fn substitute_projected<T>( &self, tcx: TyCtxt<'tcx>, var_values: &CanonicalVarValues<'tcx>, projection_fn: impl FnOnce(&V) -> T ) -> Twhere T: TypeFoldable<TyCtxt<'tcx>>,

Allows one to apply a substitute to some subset of self.value. Invoke projection_fn with self.value to get a value V that is expressed in terms of the same canonical variables bound in self (usually this extracts from subset of self). Apply the substitution var_values to this value V, replacing each of the canonical variables.

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