Enum rustc_infer::infer::RegionVariableOrigin[][src]

pub enum RegionVariableOrigin {
    MiscVariable(Span),
    PatternRegion(Span),
    AddrOfRegion(Span),
    Autoref(SpanAssocItem),
    Coercion(Span),
    EarlyBoundRegion(SpanSymbol),
    LateBoundRegion(SpanBoundRegionKindLateBoundRegionConversionTime),
    UpvarRegion(UpvarIdSpan),
    Nll(NllRegionVariableOrigin),
}
Expand description

Reasons to create a region inference variable

See error_reporting module for more details

Variants

MiscVariable(Span)

Region variables created for ill-categorized reasons, mostly indicates places in need of refactoring

Tuple Fields of MiscVariable

0: Span
PatternRegion(Span)

Regions created by a &P or [...] pattern

Tuple Fields of PatternRegion

0: Span
AddrOfRegion(Span)

Regions created by & operator

Tuple Fields of AddrOfRegion

0: Span
Autoref(SpanAssocItem)

Regions created as part of an autoref of a method receiver

Tuple Fields of Autoref

0: Span1: AssocItem
Coercion(Span)

Regions created as part of an automatic coercion

Tuple Fields of Coercion

0: Span
EarlyBoundRegion(SpanSymbol)

Region variables created as the values for early-bound regions

Tuple Fields of EarlyBoundRegion

0: Span1: Symbol
LateBoundRegion(SpanBoundRegionKindLateBoundRegionConversionTime)

Region variables created for bound regions in a function or method that is called

Tuple Fields of LateBoundRegion

0: Span1: BoundRegionKind2: LateBoundRegionConversionTime
UpvarRegion(UpvarIdSpan)

Tuple Fields of UpvarRegion

0: UpvarId1: Span
Nll(NllRegionVariableOrigin)

This origin is used for the inference variables that we create during NLL region processing.

Tuple Fields of Nll

0: NllRegionVariableOrigin

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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

Size for each variant: