pub(crate) fn map_type_params<F>( ty: &Type, params: &[&TypeParam], self_type: &Path, f: &mut F, ) -> Typewhere F: FnMut(&Ident) -> Type,