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§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