pub struct LayoutCx<'tcx, C> {
    pub tcx: C,
    pub param_env: ParamEnv<'tcx>,
}

Fields

tcx: Cparam_env: ParamEnv<'tcx>

Implementations

Compute the eligibility and assignment of each local.

Compute the full generator layout.

This is invoked by the layout_of query to record the final layout of each type.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
The TyAndLayout-wrapping type (or TyAndLayout itself), which will be returned from layout_of (see also handle_layout_err). Read more
Helper used for layout_of, to adapt tcx.layout_of(...) into a Self::LayoutOfResult (which does not need to be a Result<...>). Read more
Span to use for tcx.at(span), from layout_of.
The TyAndLayout-wrapping type (or TyAndLayout itself), which will be returned from layout_of (see also handle_layout_err). Read more
Span to use for tcx.at(span), from layout_of.
Helper used for layout_of, to adapt tcx.layout_of(...) into a Self::LayoutOfResult (which does not need to be a Result<...>). 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.

Computes the layout of a type. Note that this implicitly executes in “reveal all” mode, and will normalize the input type. Read more
Computes the layout of a type, at span. Note that this implicitly executes in “reveal all” mode, and will normalize the input type. Read more
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: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.