pub fn search_for_adt_const_param_violation<'tcx>(
    span: Span,
    tcx: TyCtxt<'tcx>,
    ty: Ty<'tcx>
) -> Option<Ty<'tcx>>
Expand description

This method traverses the structure of ty, trying to find any types that are not allowed to be used in a const generic.

This is either because the type does not implement StructuralEq and StructuralPartialEq, or because the type is intentionally not supported in const generics (such as floats and raw pointers, which are allowed in match blocks).