# Function rustc_ty_utils::assoc::associated_types_for_impl_traits_in_associated_fn

source ·

    fn associated_types_for_impl_traits_in_associated_fn(
        tcx: TyCtxt<'_>,
        fn_def_id: LocalDefId
    ) -> &[DefId]

Expand description

Given an `fn_def_id` of a trait or a trait implementation:

if `fn_def_id` is a function defined inside a trait, then it synthesizes a new def id corresponding to a new associated type for each return- position `impl Trait` in the signature.

if `fn_def_id` is a function inside of an impl, then for each synthetic associated type generated for the corresponding trait function described above, synthesize a corresponding associated type in the impl.