pub enum RegionVariableOrigin {
    MiscVariable(Span),
    PatternRegion(Span),
    AddrOfRegion(Span),
    Autoref(Span),
    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

PatternRegion(Span)

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

AddrOfRegion(Span)

Regions created by & operator

Autoref(Span)

Regions created as part of an autoref of a method receiver

Coercion(Span)

Regions created as part of an automatic coercion

EarlyBoundRegion(SpanSymbol)

Region variables created as the values for early-bound regions

LateBoundRegion(SpanBoundRegionKindLateBoundRegionConversionTime)

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

UpvarRegion(UpvarIdSpan)

Nll(NllRegionVariableOrigin)

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

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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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: 28 bytes

Size for each variant:

  • MiscVariable: 8 bytes
  • PatternRegion: 8 bytes
  • AddrOfRegion: 8 bytes
  • Autoref: 8 bytes
  • Coercion: 8 bytes
  • EarlyBoundRegion: 12 bytes
  • LateBoundRegion: 28 bytes
  • UpvarRegion: 20 bytes
  • Nll: 16 bytes