Struct rustc::ty::layout::LayoutCx [−][src]
pub struct LayoutCx<'tcx, C> {
pub tcx: C,
pub param_env: ParamEnv<'tcx>,
}🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Fields
tcx: C
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
param_env: ParamEnv<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Methods
impl<'a, 'tcx> LayoutCx<'tcx, TyCtxt<'a, 'tcx, 'tcx>>[src]
impl<'a, 'tcx> LayoutCx<'tcx, TyCtxt<'a, 'tcx, 'tcx>>fn layout_raw_uncached(
self,
ty: Ty<'tcx>
) -> Result<&'tcx LayoutDetails, LayoutError<'tcx>>[src]
fn layout_raw_uncached(
self,
ty: Ty<'tcx>
) -> Result<&'tcx LayoutDetails, LayoutError<'tcx>>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn record_layout_for_printing(self, layout: TyLayout<'tcx>)[src]
fn record_layout_for_printing(self, layout: TyLayout<'tcx>)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
This is invoked by the layout_raw query to record the final
layout of each type.
fn record_layout_for_printing_outlined(self, layout: TyLayout<'tcx>)[src]
fn record_layout_for_printing_outlined(self, layout: TyLayout<'tcx>)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
impl<'a, 'tcx> LayoutCx<'tcx, TyCtxt<'a, 'tcx, 'tcx>>[src]
impl<'a, 'tcx> LayoutCx<'tcx, TyCtxt<'a, 'tcx, 'tcx>>fn find_niche(
self,
layout: TyLayout<'tcx>,
count: u128
) -> Result<Option<(Size, Scalar, u128)>, LayoutError<'tcx>>[src]
fn find_niche(
self,
layout: TyLayout<'tcx>,
count: u128
) -> Result<Option<(Size, Scalar, u128)>, LayoutError<'tcx>>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Find the offset of a niche leaf field, starting from
the given type and recursing through aggregates, which
has at least count consecutive invalid values.
The tuple is (offset, scalar, niche_value).
Trait Implementations
impl<'tcx, C: Copy> Copy for LayoutCx<'tcx, C>[src]
impl<'tcx, C: Copy> Copy for LayoutCx<'tcx, C>impl<'tcx, C: Clone> Clone for LayoutCx<'tcx, C>[src]
impl<'tcx, C: Clone> Clone for LayoutCx<'tcx, C>fn clone(&self) -> LayoutCx<'tcx, C>[src]
fn clone(&self) -> LayoutCx<'tcx, C>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl<'tcx, T: HasDataLayout> HasDataLayout for LayoutCx<'tcx, T>[src]
impl<'tcx, T: HasDataLayout> HasDataLayout for LayoutCx<'tcx, T>fn data_layout(&self) -> &TargetDataLayout[src]
fn data_layout(&self) -> &TargetDataLayout🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
impl<'gcx, 'tcx, T: HasTyCtxt<'gcx>> HasTyCtxt<'gcx> for LayoutCx<'tcx, T>[src]
impl<'gcx, 'tcx, T: HasTyCtxt<'gcx>> HasTyCtxt<'gcx> for LayoutCx<'tcx, T>fn tcx<'b>(&'b self) -> TyCtxt<'b, 'gcx, 'gcx>[src]
fn tcx<'b>(&'b self) -> TyCtxt<'b, 'gcx, 'gcx>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
impl<'a, 'tcx> LayoutOf for LayoutCx<'tcx, TyCtxt<'a, 'tcx, 'tcx>>[src]
impl<'a, 'tcx> LayoutOf for LayoutCx<'tcx, TyCtxt<'a, 'tcx, 'tcx>>type Ty = Ty<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
type TyLayout = Result<TyLayout<'tcx>, LayoutError<'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn layout_of(self, ty: Ty<'tcx>) -> Self::TyLayout[src]
fn layout_of(self, ty: Ty<'tcx>) -> Self::TyLayout🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Computes the layout of a type. Note that this implicitly executes in "reveal all" mode.
impl<'a, 'tcx> LayoutOf for LayoutCx<'tcx, TyCtxtAt<'a, 'tcx, 'tcx>>[src]
impl<'a, 'tcx> LayoutOf for LayoutCx<'tcx, TyCtxtAt<'a, 'tcx, 'tcx>>type Ty = Ty<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
type TyLayout = Result<TyLayout<'tcx>, LayoutError<'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn layout_of(self, ty: Ty<'tcx>) -> Self::TyLayout[src]
fn layout_of(self, ty: Ty<'tcx>) -> Self::TyLayout🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Computes the layout of a type. Note that this implicitly executes in "reveal all" mode.