Struct clippy_utils::rustc_ty::AdtDef [−][src]
pub struct AdtDef {
pub did: DefId,
pub variants: IndexVec<VariantIdx, VariantDef>,
flags: AdtFlags,
pub repr: ReprOptions,
}Expand description
The definition of a user-defined type, e.g., a struct, enum, or union.
These are all interned (by alloc_adt_def) into the global arena.
The initialism ADT stands for an algebraic data type (ADT).
This is slightly wrong because unions are not ADTs.
Moreover, Rust only allows recursive data types through indirection.
Fields
did: DefIdThe DefId of the struct, enum or union item.
variants: IndexVec<VariantIdx, VariantDef>Variants of the ADT. If this is a struct or union, then there will be a single variant.
flags: AdtFlagsFlags of the ADT (e.g., is this a struct? is this non-exhaustive?).
repr: ReprOptionsRepr options provided by the user.
Auto Trait Implementations
impl RefUnwindSafe for AdtDef
impl UnwindSafe for AdtDef
Blanket Implementations
Layout
Note: Most layout information is completely unstable and may even differ between compilations. 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: 56 bytes