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 TypingMode::PostAnalysis
, 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 TypingMode::PostAnalysis
, and will normalize the input type.