Struct rustc_middle::ty::layout::LayoutCx [−][src]
pub struct LayoutCx<'tcx, C> {
pub tcx: C,
pub param_env: ParamEnv<'tcx>,
}Fields
tcx: Cparam_env: ParamEnv<'tcx>Implementations
fn univariant_uninterned(
&self,
ty: Ty<'tcx>,
fields: &[TyAndLayout<'_>],
repr: &ReprOptions,
kind: StructKind
) -> Result<Layout, LayoutError<'tcx>>
fn generator_saved_local_eligibility(
&self,
info: &GeneratorLayout<'tcx>
) -> (BitSet<GeneratorSavedLocal>, IndexVec<GeneratorSavedLocal, SavedLocalEligibility>)
fn generator_saved_local_eligibility(
&self,
info: &GeneratorLayout<'tcx>
) -> (BitSet<GeneratorSavedLocal>, IndexVec<GeneratorSavedLocal, SavedLocalEligibility>)
Compute the eligibility and assignment of each local.
fn generator_layout(
&self,
ty: Ty<'tcx>,
def_id: DefId,
substs: SubstsRef<'tcx>
) -> Result<&'tcx Layout, LayoutError<'tcx>>
fn generator_layout(
&self,
ty: Ty<'tcx>,
def_id: DefId,
substs: SubstsRef<'tcx>
) -> Result<&'tcx Layout, LayoutError<'tcx>>
Compute the full generator layout.
This is invoked by the layout_raw query to record the final
layout of each type.
Trait Implementations
Computes the layout of a type. Note that this implicitly executes in “reveal all” mode.
type TyAndLayout = Result<TyAndLayout<'tcx>, LayoutError<'tcx>>
Computes the layout of a type. Note that this implicitly executes in “reveal all” mode.
type TyAndLayout = Result<TyAndLayout<'tcx>, LayoutError<'tcx>>
Auto Trait Implementations
impl<'tcx, C> !RefUnwindSafe for LayoutCx<'tcx, C>
impl<'tcx, C> !UnwindSafe for LayoutCx<'tcx, C>
Blanket Implementations
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.