Skip to main content

layout_of_ty

Function layout_of_ty 

Source
pub fn layout_of_ty<'tcx>(
    tcx: TyCtxt<'tcx>,
    caller: DefId,
    ty: Ty<'tcx>,
) -> Option<TyAndLayout<'tcx, Ty<'tcx>>>
Expand description

Compute the full type layout, catching rustc panics and layout errors. Shared by type_layout and the symbolic VM’s size/align/field-offset queries so the layout_of call and its panic-guard live in one place.