pub fn suggest_restriction<'tcx, G: EmissionGuarantee>(
tcx: TyCtxt<'tcx>,
item_id: LocalDefId,
hir_generics: &Generics<'tcx>,
msg: &str,
err: &mut Diag<'_, G>,
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.