[−][src]Struct rustc_middle::ty::layout::LayoutCx
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]
&self,
a: Scalar,
b: Scalar
) -> Layout
pub(in ty::layout) fn univariant_uninterned(
&self,
ty: Ty<'tcx>,
fields: &[TyAndLayout<'_>],
repr: &ReprOptions,
kind: StructKind
) -> Result<Layout, LayoutError<'tcx>>[src]
&self,
ty: Ty<'tcx>,
fields: &[TyAndLayout<'_>],
repr: &ReprOptions,
kind: StructKind
) -> Result<Layout, LayoutError<'tcx>>
pub(in ty::layout) fn layout_raw_uncached(
&self,
ty: Ty<'tcx>
) -> Result<&'tcx Layout, LayoutError<'tcx>>[src]
&self,
ty: Ty<'tcx>
) -> Result<&'tcx Layout, LayoutError<'tcx>>
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]
&self,
info: &GeneratorLayout<'tcx>
) -> (BitSet<GeneratorSavedLocal>, IndexVec<GeneratorSavedLocal, SavedLocalEligibility>)
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]
&self,
ty: Ty<'tcx>,
def_id: DefId,
substs: SubstsRef<'tcx>
) -> Result<&'tcx Layout, LayoutError<'tcx>>
Compute the full generator layout.
pub(in ty::layout) fn record_layout_for_printing(
&self,
layout: TyAndLayout<'tcx>
)[src]
&self,
layout: TyAndLayout<'tcx>
)
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]
&self,
layout: TyAndLayout<'tcx>
)
Trait Implementations
impl<'tcx, T: HasDataLayout> HasDataLayout for LayoutCx<'tcx, T>[src]
pub fn data_layout(&self) -> &TargetDataLayout[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.
pub fn spanned_layout_of(&self, ty: Self::Ty, _span: Span) -> Self::TyAndLayout[src]
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.
pub fn spanned_layout_of(&self, ty: Self::Ty, _span: Span) -> Self::TyAndLayout[src]
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,
C: Unpin,
impl<'tcx, C> !UnwindSafe for LayoutCx<'tcx, C>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> MaybeResult<T> for T[src]
type Error = !
pub fn from(Result<T, <T as MaybeResult<T>>::Error>) -> T[src]
pub fn to_result(self) -> Result<T, <T as MaybeResult<T>>::Error>[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.