pub enum FullDefKind<'tcx> {
Show 30 variants
Adt(Adt<'tcx>),
TyAlias(TyAlias<'tcx>),
ForeignTy,
AssocTy(AssocTy<'tcx>),
OpaqueTy,
Trait(Trait<'tcx>),
TraitAlias(TraitAlias<'tcx>),
TraitImpl(TraitImpl<'tcx>),
InherentImpl(InherentImpl<'tcx>),
Fn(Fn<'tcx>),
FnPtr(FnPointer<'tcx>),
AssocFn(AssocFn<'tcx>),
Closure(Closure<'tcx>),
Const(Const<'tcx>),
AssocConst(AssocConst<'tcx>),
Static(Static<'tcx>),
ExternCrate,
Use,
Mod(Mod),
ForeignMod(ForeignMod),
TyParam,
ConstParam,
LifetimeParam,
Variant,
Ctor(Ctor<'tcx>),
Field,
Macro,
GlobalAsm,
SyntheticCoroutineBody,
TestBinderConstraints,
}Expand description
Imbues rustc_hir::def::DefKind with a lot of extra information.
Variants§
Adt(Adt<'tcx>)
ADts (Struct, Enum and Union map to this variant).
TyAlias(TyAlias<'tcx>)
Type alias: type Foo = Bar;
ForeignTy
Type from an extern block.
AssocTy(AssocTy<'tcx>)
Associated type: trait MyTrait { type Assoc; }
OpaqueTy
Opaque type, aka impl Trait.
Trait(Trait<'tcx>)
TraitAlias(TraitAlias<'tcx>)
Trait alias: trait IntIterator = Iterator<Item = i32>;
TraitImpl(TraitImpl<'tcx>)
InherentImpl(InherentImpl<'tcx>)
Fn(Fn<'tcx>)
FnPtr(FnPointer<'tcx>)
Synthetic item representing a particular shape of function pointer types.
E.g. for<'a> fn(&'a u32) -> Adt<'a, u32> is considered to be an instantiation of the fake
item for<'a> fn(&'a A) -> Adt<'a, B> with A=B=u32. Note how the item can therefore
have trait clauses if some Adt does.
AssocFn(AssocFn<'tcx>)
Associated function: impl MyStruct { fn associated() {} } or trait Foo { fn associated() {} }
Closure(Closure<'tcx>)
A closure, coroutine, or coroutine-closure.
Const(Const<'tcx>)
AssocConst(AssocConst<'tcx>)
Associated constant: trait MyTrait { const ASSOC: usize; }
Static(Static<'tcx>)
ExternCrate
Use
Mod(Mod)
ForeignMod(ForeignMod)
An extern block.
TyParam
Type parameter: the T in struct Vec<T> { ... }
ConstParam
Constant generic parameter: struct Foo<const N: usize> { ... }
LifetimeParam
Lifetime parameter: the 'a in struct Foo<'a> { ... }
Variant
Refers to the variant definition, DefKind::Ctor refers to its constructor if it exists.
Ctor(Ctor<'tcx>)
The constructor function of a tuple/unit struct or tuple/unit enum variant.
Field
A field in a struct, enum or union. e.g.
barinstruct Foo { bar: u8 }Foo::Bar::0inenum Foo { Bar(u8) }
Macro
Macros
GlobalAsm
A use of global_asm!.
SyntheticCoroutineBody
A synthetic coroutine body created by the lowering of a coroutine-closure, such as an async closure.
TestBinderConstraints
Trait Implementations§
Source§impl<'tcx> Clone for FullDefKind<'tcx>
impl<'tcx> Clone for FullDefKind<'tcx>
Source§fn clone(&self) -> FullDefKind<'tcx>
fn clone(&self) -> FullDefKind<'tcx>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'tcx> !DynSync for FullDefKind<'tcx>
impl<'tcx> !Freeze for FullDefKind<'tcx>
impl<'tcx> !RefUnwindSafe for FullDefKind<'tcx>
impl<'tcx> !Sync for FullDefKind<'tcx>
impl<'tcx> !UnwindSafe for FullDefKind<'tcx>
impl<'tcx> DynSend for FullDefKind<'tcx>
impl<'tcx> Send for FullDefKind<'tcx>
impl<'tcx> Unpin for FullDefKind<'tcx>
impl<'tcx> UnsafeUnpin for FullDefKind<'tcx>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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