Enum rustc_middle::infer::canonical::CanonicalTyVarKind [−][src]
pub enum CanonicalTyVarKind {
General(UniverseIndex),
Int,
Float,
}Expand description
Rust actually has more than one category of type variables; notably, the type variables we create for literals (e.g., 22 or 22.) can only be instantiated with integral/float types (e.g., usize or f32). In order to faithfully reproduce a type, we need to know what set of types a given type variable can be unified with.
Variants
General(UniverseIndex)General type variable ?T that can be unified with arbitrary types.
Integral type variable ?I (that can only be unified with integral types).
Floating-point type variable ?F (that can only be unified with float types).
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for CanonicalTyVarKindimpl Send for CanonicalTyVarKindimpl Sync for CanonicalTyVarKindimpl Unpin for CanonicalTyVarKindimpl UnwindSafe for CanonicalTyVarKindBlanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may be different between compiler versions and platforms. 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