pub fn suggest_constraining_type_param(
    tcx: TyCtxt<'_>,
    generics: &Generics<'_>,
    err: &mut DiagnosticBuilder<'_>,
    param_name: &str,
    constraint: &str,
    def_id: Option<DefId>,
    span_to_replace: Option<Span>
) -> bool
Expand description

Suggest restricting a type param with a new bound.

If span_to_replace is provided, then that span will be replaced with the constraint. If one wasn’t provided, then the full bound will be suggested.