Struct rustc_hir::GenericParam

source ·
pub struct GenericParam<'hir> {
    pub hir_id: HirId,
    pub name: ParamName,
    pub span: Span,
    pub pure_wrt_drop: bool,
    pub kind: GenericParamKind<'hir>,
    pub colon_span: Option<Span>,
}

Fields

hir_id: HirIdname: ParamNamespan: Spanpure_wrt_drop: boolkind: GenericParamKind<'hir>colon_span: Option<Span>

Implementations

Synthetic type-parameters are inserted after normal ones. In order for normal parameters to be able to refer to synthetic ones, scans them first.

This can happen for async fn, e.g. async fn f<'_>(&'_ self).

See lifetime_to_generic_param in rustc_ast_lowering for more information.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

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: 80 bytes