pub struct TypeOutlives<'cx, 'tcx, D>where
    D: TypeOutlivesDelegate<'tcx>,
{ delegate: D, tcx: TyCtxt<'tcx>, verify_bound: VerifyBoundCx<'cx, 'tcx>, }
Expand description

The TypeOutlives struct has the job of “lowering” a T: 'a obligation into a series of 'a: 'b constraints and “verify“s, as described on the module comment. The final constraints are emitted via a “delegate” of type D – this is usually the infcx, which accrues them into the region_obligations code, but for NLL we use something else.

Fields

delegate: Dtcx: TyCtxt<'tcx>verify_bound: VerifyBoundCx<'cx, 'tcx>

Implementations

Adds constraints to inference such that T: 'a holds (or reports an error if it cannot).

Parameters
  • origin, the reason we need this constraint
  • ty, the type T
  • region, the region 'a

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: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.