pub fn ty_is_representable<'tcx>(
    tcx: TyCtxt<'tcx>,
    ty: Ty<'tcx>,
    sp: Span,
    field_id: Option<HirId>
) -> Representability
Expand description

Check whether a type is representable. This means it cannot contain unboxed structural recursion. This check is needed for structs and enums.