[−][src]Enum rustc_hir::TyKind
The various kinds of types recognized by the compiler.
Variants
Slice(&'hir Ty<'hir>)A variable length slice (i.e., [T]).
A fixed length array (i.e., [T; n]).
Ptr(MutTy<'hir>)A raw pointer (i.e., *const T or *mut T).
A reference (i.e., &'a T or &'a mut T).
BareFn(&'hir BareFnTy<'hir>)A bare function (e.g., fn(usize) -> bool).
The never type (!).
A tuple ((A, B, C, D, ...)).
Path(QPath<'hir>)A path to a type definition (module::module::...::Type), or an
associated type (e.g., <Vec<T> as Trait>::Type or <T>::Target).
Type parameters may be stored in each PathSegment.
OpaqueDef(ItemId, &'hir [GenericArg<'hir>])A opaque type definition itself. This is currently only used for the
opaque type Foo: Trait item that impl Trait in desugars to.
The generic argument list contains the lifetimes (and in the future
possibly parameters) that are actually bound on the impl Trait.
TraitObject(&'hir [PolyTraitRef<'hir>], Lifetime)A trait object type Bound1 + Bound2 + Bound3
where Bound is a trait or a lifetime.
Typeof(AnonConst)Unused for now.
TyKind::Infer means the type should be inferred instead of it having been
specified. This can appear anywhere in a type.
Placeholder for a type that has failed to be defined.
Trait Implementations
impl<'hir> Debug for TyKind<'hir>[src]
impl<'hir, __CTX> HashStable<__CTX> for TyKind<'hir> where
__CTX: HashStableContext, [src]
__CTX: HashStableContext,
pub fn hash_stable(&self, __hcx: &mut __CTX, __hasher: &mut StableHasher)[src]
Auto Trait Implementations
impl<'hir> !RefUnwindSafe for TyKind<'hir>
impl<'hir> !Send for TyKind<'hir>
impl<'hir> !Sync for TyKind<'hir>
impl<'hir> Unpin for TyKind<'hir>
impl<'hir> !UnwindSafe for TyKind<'hir>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,