fn suggest_restriction<'tcx>(
tcx: TyCtxt<'tcx>,
hir_id: HirId,
hir_generics: &Generics<'tcx>,
msg: &str,
err: &mut Diagnostic,
fn_sig: Option<&FnSig<'_>>,
projection: Option<&AliasTy<'_>>,
trait_pred: PolyTraitPredicate<'tcx>,
super_traits: Option<(&Ident, &GenericBounds<'_>)>
)
Expand description
Type parameter needs more bounds. The trivial case is T
where T: Bound
, but
it can also be an impl Trait
param that needs to be decomposed to a type
param for cleaner code.