GenericParamKind in rustc_ast::ast - Rust (original) (raw)

Enum GenericParamKind

Source

pub enum GenericParamKind {
    Lifetime,
    Type {
        default: Option<Box<Ty>>,
    },
    Const {
        ty: Box<Ty>,
        span: Span,
        default: Option<AnonConst>,
    },
}

§

A lifetime definition (e.g., 'a: 'b + 'c + 'd).

§

Fields

§

Fields

Span of the whole parameter definition, including default.

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: