[−][src]Struct rustc_middle::ty::layout::LayoutCx

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

Fields

tcx: Cparam_env: ParamEnv<'tcx>

Implementations

impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>>[src]

pub(in ty::layout) fn scalar_pair(
    &self,
    a: Scalar,
    b: Scalar
) -> Layout
[src]

pub(in ty::layout) fn univariant_uninterned(
    &self,
    ty: Ty<'tcx>,
    fields: &[TyAndLayout<'_>],
    repr: &ReprOptions,
    kind: StructKind
) -> Result<Layout, LayoutError<'tcx>>
[src]

pub(in ty::layout) fn layout_raw_uncached(
    &self,
    ty: Ty<'tcx>
) -> Result<&'tcx Layout, LayoutError<'tcx>>
[src]

impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>>[src]

pub(in ty::layout) fn generator_saved_local_eligibility(
    &self,
    info: &GeneratorLayout<'tcx>
) -> (BitSet<GeneratorSavedLocal>, IndexVec<GeneratorSavedLocal, SavedLocalEligibility>)
[src]

Compute the eligibility and assignment of each local.

pub(in ty::layout) fn generator_layout(
    &self,
    ty: Ty<'tcx>,
    def_id: DefId,
    substs: SubstsRef<'tcx>
) -> Result<&'tcx Layout, LayoutError<'tcx>>
[src]

Compute the full generator layout.

pub(in ty::layout) fn record_layout_for_printing(
    &self,
    layout: TyAndLayout<'tcx>
)
[src]

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

pub(in ty::layout) fn record_layout_for_printing_outlined(
    &self,
    layout: TyAndLayout<'tcx>
)
[src]

Trait Implementations

impl<'tcx, T: HasDataLayout> HasDataLayout for LayoutCx<'tcx, T>[src]

impl<'tcx, C> HasParamEnv<'tcx> for LayoutCx<'tcx, C>[src]

impl<'tcx, T: HasTyCtxt<'tcx>> HasTyCtxt<'tcx> for LayoutCx<'tcx, T>[src]

impl<'tcx> LayoutOf for LayoutCx<'tcx, TyCtxt<'tcx>>[src]

type Ty = Ty<'tcx>

type TyAndLayout = Result<TyAndLayout<'tcx>, LayoutError<'tcx>>

pub fn layout_of(&self, ty: Ty<'tcx>) -> Self::TyAndLayout[src]

Computes the layout of a type. Note that this implicitly executes in "reveal all" mode.

impl<'tcx> LayoutOf for LayoutCx<'tcx, TyCtxtAt<'tcx>>[src]

type Ty = Ty<'tcx>

type TyAndLayout = Result<TyAndLayout<'tcx>, LayoutError<'tcx>>

pub fn layout_of(&self, ty: Ty<'tcx>) -> Self::TyAndLayout[src]

Computes the layout of a type. Note that this implicitly executes in "reveal all" mode.

Auto Trait Implementations

impl<'tcx, C> !RefUnwindSafe for LayoutCx<'tcx, C>

impl<'tcx, C> !Send for LayoutCx<'tcx, C>

impl<'tcx, C> !Sync for LayoutCx<'tcx, C>

impl<'tcx, C> Unpin for LayoutCx<'tcx, C> where
    C: Unpin, 

impl<'tcx, C> !UnwindSafe for LayoutCx<'tcx, C>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeResult<T> for T[src]

type Error = !

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]