GenericParamKind in rustc_ast::ast - Rust (original) (raw)
Enum GenericParamKind
pub enum GenericParamKind {
Lifetime,
Type {
default: Option<P<Ty>>,
},
Const {
ty: P<Ty>,
kw_span: Span,
default: Option<AnonConst>,
},
}
A lifetime definition (e.g., 'a: 'b + 'c + 'd
).
Fields
Fields
Span of the const
keyword.
Optional default value for the const generic param.
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: 32 bytes
Size for each variant:
Lifetime
: 0 bytesType
: 8 bytesConst
: 32 bytes