Enum rustc_type_ir::InferTy [−][src]
A placeholder for a type that hasn’t been inferred yet.
E.g., if we have an empty array ([]), then we create a fresh
type variable for the element type since we won’t know until it’s
used what the element type is supposed to be.
Variants
TyVar(TyVid)A type variable.
IntVar(IntVid)An integral type variable ({integer}).
These are created when the compiler sees an integer literal like
1 that could be several different types (u8, i32, u32, etc.).
We don’t know until it’s used what type it’s supposed to be, so
we create a fresh type variable.
FloatVar(FloatVid)A floating-point type variable ({float}).
These are created when the compiler sees an float literal like
1.0 that could be either an f32 or an f64.
We don’t know until it’s used what type it’s supposed to be, so
we create a fresh type variable.
FreshTy(u32)A FreshTy is one that is generated as a replacement
for an unbound type variable. This is convenient for caching etc. See
rustc_infer::infer::freshen for more details.
Compare with TyVar.
FreshIntTy(u32)FreshFloatTy(u32)Trait Implementations
impl Clone for InferTy[src]
impl Copy for InferTy[src]
impl Debug for InferTy[src]
impl<__D: Decoder> Decodable<__D> for InferTy[src]
impl Display for InferTy[src]
impl<__E: Encoder> Encodable<__E> for InferTy[src]
impl Eq for InferTy[src]
impl Hash for InferTy[src]
fn hash<__H: Hasher>(&self, state: &mut __H)[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl<CTX> HashStable<CTX> for InferTy[src]
fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher)[src]
impl Ord for InferTy[src]
fn cmp(&self, other: &InferTy) -> Ordering[src]
#[must_use]pub fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self1.50.0[src]
impl PartialEq<InferTy> for InferTy[src]
impl PartialOrd<InferTy> for InferTy[src]
fn partial_cmp(&self, other: &InferTy) -> Option<Ordering>[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool1.0.0[src]
impl StructuralEq for InferTy[src]
impl StructuralPartialEq for InferTy[src]
Auto Trait Implementations
impl RefUnwindSafe for InferTy
impl Send for InferTy
impl Sync for InferTy
impl Unpin for InferTy
impl UnwindSafe for InferTy
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,