pub trait LayoutOf<'tcx>: LayoutOfHelpers<'tcx> {
// Provided methods
fn layout_of(&self, ty: Ty<'tcx>) -> Self::LayoutOfResult { ... }
fn spanned_layout_of(
&self,
ty: Ty<'tcx>,
span: Span,
) -> Self::LayoutOfResult { ... }
}
Expand description
Blanket extension trait for contexts that can compute layouts of types.
Provided Methods§
sourcefn layout_of(&self, ty: Ty<'tcx>) -> Self::LayoutOfResult
fn layout_of(&self, ty: Ty<'tcx>) -> Self::LayoutOfResult
Computes the layout of a type. Note that this implicitly executes in “reveal all” mode, and will normalize the input type.
sourcefn spanned_layout_of(&self, ty: Ty<'tcx>, span: Span) -> Self::LayoutOfResult
fn spanned_layout_of(&self, ty: Ty<'tcx>, span: Span) -> Self::LayoutOfResult
Computes the layout of a type, at span
. Note that this implicitly
executes in “reveal all” mode, and will normalize the input type.