rustc_trait_selection::errors

Function impl_trait_overcapture_suggestion

Source
pub fn impl_trait_overcapture_suggestion<'tcx>(
    tcx: TyCtxt<'tcx>,
    opaque_def_id: LocalDefId,
    fn_def_id: LocalDefId,
    captured_args: FxIndexSet<DefId>,
) -> Option<AddPreciseCapturingForOvercapture>
Expand description

Given a set of captured DefId for an RPIT (opaque_def_id) and a given function (fn_def_id), try to suggest adding + use<...> to capture just the specified parameters. If one of those parameters is an APIT, then try to suggest turning it into a regular type parameter.