fn layout_of_enum<'a, LC, FieldIdx: Idx, VariantIdx: Idx, F>(
    layout_calc: &LC,
    repr: &ReprOptions,
    variants: &IndexSlice<VariantIdx, IndexVec<FieldIdx, F>>,
    discr_range_of_repr: impl Fn(i128, i128) -> (Integer, bool),
    discriminants: impl Iterator<Item = (VariantIdx, i128)>,
    dont_niche_optimize_enum: bool,
    dl: &TargetDataLayout
) -> Option<LayoutS<FieldIdx, VariantIdx>>
where LC: LayoutCalculator + ?Sized, F: Deref<Target = &'a LayoutS<FieldIdx, VariantIdx>> + Debug,