pub enum TypeLongId {
Concrete(ConcreteTypeId),
Tuple(Vec<TypeId>),
Snapshot(TypeId),
GenericParameter(GenericParamId),
Var(TypeVar),
Coupon(FunctionId),
FixedSizeArray {
type_id: TypeId,
size: ConstValueId,
},
ImplType(ImplTypeId),
TraitType(TraitTypeId),
Closure(ClosureTypeLongId),
Missing(DiagnosticAdded),
}
Variants§
Concrete(ConcreteTypeId)
Tuple(Vec<TypeId>)
Some expressions might have invalid types during processing, either due to errors or during inference.
Snapshot(TypeId)
GenericParameter(GenericParamId)
Var(TypeVar)
Coupon(FunctionId)
FixedSizeArray
ImplType(ImplTypeId)
TraitType(TraitTypeId)
Closure(ClosureTypeLongId)
Missing(DiagnosticAdded)
Implementations§
source§impl TypeLongId
impl TypeLongId
pub fn format(&self, db: &dyn SemanticGroup) -> String
sourcepub fn head(&self, db: &dyn SemanticGroup) -> Option<TypeHead>
pub fn head(&self, db: &dyn SemanticGroup) -> Option<TypeHead>
Returns the TypeHead for a type if available.
sourcepub fn is_phantom(&self, db: &dyn SemanticGroup) -> bool
pub fn is_phantom(&self, db: &dyn SemanticGroup) -> bool
Returns whether the type is phantom.
Type is considered phantom if it has the #[phantom]
attribute, (or an other attribute
declared by a plugin as defining a phantom type), or is a tuple or fixed sized array
containing it.
Trait Implementations§
source§impl Clone for TypeLongId
impl Clone for TypeLongId
source§fn clone(&self) -> TypeLongId
fn clone(&self) -> TypeLongId
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 TypeLongId
impl Debug for TypeLongId
source§impl DebugWithDb<dyn SemanticGroup> for TypeLongId
impl DebugWithDb<dyn SemanticGroup> for TypeLongId
source§impl Hash for TypeLongId
impl Hash for TypeLongId
source§impl<'a> Intern<'a, dyn SemanticGroup + 'a, TypeId> for TypeLongId
impl<'a> Intern<'a, dyn SemanticGroup + 'a, TypeId> for TypeLongId
source§impl<'a> LookupIntern<'a, dyn SemanticGroup + 'a, TypeLongId> for TypeId
impl<'a> LookupIntern<'a, dyn SemanticGroup + 'a, TypeLongId> for TypeId
fn lookup_intern( &self, db: &(impl Upcast<dyn SemanticGroup + 'a> + ?Sized), ) -> TypeLongId
source§impl OptionFrom<TypeLongId> for ConcreteTypeId
impl OptionFrom<TypeLongId> for ConcreteTypeId
fn option_from(other: TypeLongId) -> Option<Self>
source§impl PartialEq for TypeLongId
impl PartialEq for TypeLongId
source§impl<T: SemanticRewriter<ConcreteTypeId, Error> + SemanticRewriter<Vec<TypeId>, Error> + SemanticRewriter<TypeId, Error> + SemanticRewriter<GenericParamId, Error> + SemanticRewriter<TypeVar, Error> + SemanticRewriter<FunctionId, Error> + SemanticRewriter<ConstValueId, Error> + SemanticRewriter<ImplTypeId, Error> + SemanticRewriter<TraitTypeId, Error> + SemanticRewriter<ClosureTypeLongId, Error>, Error> SemanticObject<T, Error> for TypeLongId
impl<T: SemanticRewriter<ConcreteTypeId, Error> + SemanticRewriter<Vec<TypeId>, Error> + SemanticRewriter<TypeId, Error> + SemanticRewriter<GenericParamId, Error> + SemanticRewriter<TypeVar, Error> + SemanticRewriter<FunctionId, Error> + SemanticRewriter<ConstValueId, Error> + SemanticRewriter<ImplTypeId, Error> + SemanticRewriter<TraitTypeId, Error> + SemanticRewriter<ClosureTypeLongId, Error>, Error> SemanticObject<T, Error> for TypeLongId
fn default_rewrite(&mut self, rewriter: &mut T) -> Result<RewriteResult, Error>
source§impl SemanticRewriter<TypeLongId, DiagnosticAdded> for SubstitutionRewriter<'_>
impl SemanticRewriter<TypeLongId, DiagnosticAdded> for SubstitutionRewriter<'_>
fn internal_rewrite(&mut self, value: &mut TypeLongId) -> Maybe<RewriteResult>
fn rewrite(&mut self, value: T) -> Result<T, Error>
source§impl SemanticRewriter<TypeLongId, NoError> for Inference<'_>
impl SemanticRewriter<TypeLongId, NoError> for Inference<'_>
fn internal_rewrite( &mut self, value: &mut TypeLongId, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
impl Eq for TypeLongId
impl StructuralPartialEq for TypeLongId
Auto Trait Implementations§
impl Freeze for TypeLongId
impl RefUnwindSafe for TypeLongId
impl Send for TypeLongId
impl Sync for TypeLongId
impl Unpin for TypeLongId
impl UnwindSafe for TypeLongId
Blanket Implementations§
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more