Struct rustc_middle::ty::EffectVid
source · pub struct EffectVid<'tcx> {
pub index: u32,
pub phantom: PhantomData<&'tcx ()>,
}
Expand description
An effect variable ID.
Handling effect infer variables happens separately from const infer variables because we do not want to reuse any of the const infer machinery. If we try to relate an effect variable with a normal one, we would ICE, which can catch bugs where we are not correctly using the effect var for an effect param. Fallback is also implemented on top of having separate effect and normal const variables.
Fields§
§index: u32
§phantom: PhantomData<&'tcx ()>
Trait Implementations§
source§impl<'tcx> Ord for EffectVid<'tcx>
impl<'tcx> Ord for EffectVid<'tcx>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<'tcx> PartialEq<EffectVid<'tcx>> for EffectVid<'tcx>
impl<'tcx> PartialEq<EffectVid<'tcx>> for EffectVid<'tcx>
source§impl<'tcx> PartialOrd<EffectVid<'tcx>> for EffectVid<'tcx>
impl<'tcx> PartialOrd<EffectVid<'tcx>> for EffectVid<'tcx>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<'tcx> UnifyKey for EffectVid<'tcx>
impl<'tcx> UnifyKey for EffectVid<'tcx>
type Value = Option<EffectVarValue<'tcx>>
fn index(&self) -> u32
fn from_index(i: u32) -> Self
fn tag() -> &'static str
source§fn order_roots(
a: Self,
a_value: &Self::Value,
b: Self,
b_value: &Self::Value
) -> Option<(Self, Self)>
fn order_roots( a: Self, a_value: &Self::Value, b: Self, b_value: &Self::Value ) -> Option<(Self, Self)>
You should return first the key that should be used as root,
then the other key (that will then point to the new root). Read more
impl<'tcx> Copy for EffectVid<'tcx>
impl<'tcx> Eq for EffectVid<'tcx>
impl<'tcx> StructuralEq for EffectVid<'tcx>
impl<'tcx> StructuralPartialEq for EffectVid<'tcx>
Auto Trait Implementations§
impl<'tcx> RefUnwindSafe for EffectVid<'tcx>
impl<'tcx> Send for EffectVid<'tcx>
impl<'tcx> Sync for EffectVid<'tcx>
impl<'tcx> Unpin for EffectVid<'tcx>
impl<'tcx> UnwindSafe for EffectVid<'tcx>
Blanket Implementations§
source§impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for Twhere
T: Copy,
impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for Twhere T: Copy,
fn allocate_on<'a>(self, arena: &'a Arena<'tcx>) -> &'a mut T
fn allocate_from_iter<'a>( arena: &'a Arena<'tcx>, iter: impl IntoIterator<Item = T> ) -> &'a mut [T]
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
source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
source§impl<P> IntoQueryParam<P> for P
impl<P> IntoQueryParam<P> for P
fn into_query_param(self) -> P
source§impl<T> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
source§impl<'tcx, T> ToPredicate<'tcx, T> for T
impl<'tcx, T> ToPredicate<'tcx, T> for T
fn to_predicate(self, _tcx: TyCtxt<'tcx>) -> T
source§impl<Tcx, T> Value<Tcx> for Twhere
Tcx: DepContext,
impl<Tcx, T> Value<Tcx> for Twhere Tcx: DepContext,
default fn from_cycle_error( tcx: Tcx, cycle: &[QueryInfo], _guar: ErrorGuaranteed ) -> T
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: 4 bytes