Struct chalk_ir::InferenceVar
source · pub struct InferenceVar {
pub(crate) index: u32,
}
Expand description
A type, lifetime or constant whose value is being inferred.
Fields§
§index: u32
Implementations§
source§impl InferenceVar
impl InferenceVar
sourcepub fn to_ty<I: Interner>(self, interner: I, kind: TyVariableKind) -> Ty<I>
pub fn to_ty<I: Interner>(self, interner: I, kind: TyVariableKind) -> Ty<I>
Wraps the inference variable in a type.
sourcepub fn to_lifetime<I: Interner>(self, interner: I) -> Lifetime<I>
pub fn to_lifetime<I: Interner>(self, interner: I) -> Lifetime<I>
Wraps the inference variable in a lifetime.
Trait Implementations§
source§impl Clone for InferenceVar
impl Clone for InferenceVar
source§fn clone(&self) -> InferenceVar
fn clone(&self) -> InferenceVar
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for InferenceVar
impl Debug for InferenceVar
source§impl From<u32> for InferenceVar
impl From<u32> for InferenceVar
source§fn from(index: u32) -> InferenceVar
fn from(index: u32) -> InferenceVar
Converts to this type from the input type.
source§impl Hash for InferenceVar
impl Hash for InferenceVar
source§impl Ord for InferenceVar
impl Ord for InferenceVar
source§fn cmp(&self, other: &InferenceVar) -> Ordering
fn cmp(&self, other: &InferenceVar) -> Ordering
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 PartialEq<InferenceVar> for InferenceVar
impl PartialEq<InferenceVar> for InferenceVar
source§fn eq(&self, other: &InferenceVar) -> bool
fn eq(&self, other: &InferenceVar) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<InferenceVar> for InferenceVar
impl PartialOrd<InferenceVar> for InferenceVar
source§fn partial_cmp(&self, other: &InferenceVar) -> Option<Ordering>
fn partial_cmp(&self, other: &InferenceVar) -> Option<Ordering>
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 more