[][src]Enum cranelift_codegen_meta::cdsl::type_inference::Constraint

pub(crate) enum Constraint {
    WiderOrEq(TypeVarTypeVar),
    Eq(TypeVarTypeVar),
    InTypeset(TypeVarTypeSet),
}

Variants

WiderOrEq(TypeVarTypeVar)

Constraint specifying that a type var tv1 must be wider than or equal to type var tv2 at runtime. This requires that:

  1. They have the same number of lanes
  2. In a lane tv1 has at least as many bits as tv2.

Constraint specifying that two derived type vars must have the same runtime type.

InTypeset(TypeVarTypeSet)

Constraint specifying that a type var must belong to some typeset.

Methods

impl Constraint[src]

fn translate_with<F: Fn(&TypeVar) -> TypeVar>(&self, func: F) -> Constraint[src]

fn translate_with_map(
    &self,
    original_to_own_typevar: &HashMap<&TypeVar, TypeVar>
) -> Constraint
[src]

Creates a new constraint by replacing type vars by their hashmap equivalent.

fn translate_with_env(&self, type_env: &TypeEnvironment) -> Constraint[src]

Creates a new constraint by replacing type vars by their canonical equivalent.

fn is_trivial(&self) -> bool[src]

fn is_concrete(&self) -> bool[src]

Returns true iff all the referenced type vars are singletons.

fn typevar_args(&self) -> Vec<&TypeVar>[src]

Trait Implementations

impl Debug for Constraint[src]

impl Eq for Constraint[src]

impl Hash for Constraint[src]

impl PartialEq<Constraint> for Constraint[src]

impl StructuralEq for Constraint[src]

impl StructuralPartialEq for Constraint[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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.

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.