@@ -153,6 +153,7 @@ fn associated_item_from_trait_item_ref(trait_item_ref: &hir::TraitItemRef) -> ty
153153 trait_item_def_id: Some(owner_id.to_def_id()),
154154 container: ty::TraitContainer,
155155 fn_has_self_parameter: has_self,
156+ opt_rpitit_info: None,
156157 }
157158}
158159
@@ -171,6 +172,7 @@ fn associated_item_from_impl_item_ref(impl_item_ref: &hir::ImplItemRef) -> ty::A
171172 trait_item_def_id: impl_item_ref.trait_item_def_id,
172173 container: ty::ImplContainer,
173174 fn_has_self_parameter: has_self,
175+ opt_rpitit_info: None,
174176 }
175177}
176178
@@ -262,19 +264,17 @@ fn associated_item_for_impl_trait_in_trait(
262264 // Copy span of the opaque.
263265 trait_assoc_ty.def_ident_span(Some(span));
264266
265- // Add the def_id of the function and opaque that generated this synthesized associated type.
266- trait_assoc_ty.opt_rpitit_info(Some(ImplTraitInTraitData::Trait {
267- fn_def_id,
268- opaque_def_id: opaque_ty_def_id.to_def_id(),
269- }));
270-
271267 trait_assoc_ty.associated_item(ty::AssocItem {
272268 name: kw::Empty,
273269 kind: ty::AssocKind::Type,
274270 def_id,
275271 trait_item_def_id: None,
276272 container: ty::TraitContainer,
277273 fn_has_self_parameter: false,
274+ opt_rpitit_info: Some(ImplTraitInTraitData::Trait {
275+ fn_def_id,
276+ opaque_def_id: opaque_ty_def_id.to_def_id(),
277+ }),
278278 });
279279
280280 // Copy visility of the containing function.
@@ -328,18 +328,14 @@ fn impl_associated_item_for_impl_trait_in_trait(
328328 // `opt_local_def_id_to_hir_id` with `None`.
329329 impl_assoc_ty.opt_local_def_id_to_hir_id(None);
330330
331- // Add the def_id of the function that generated this synthesized associated type.
332- impl_assoc_ty.opt_rpitit_info(Some(ImplTraitInTraitData::Impl {
333- fn_def_id: impl_fn_def_id.to_def_id(),
334- }));
335-
336331 impl_assoc_ty.associated_item(ty::AssocItem {
337332 name: kw::Empty,
338333 kind: ty::AssocKind::Type,
339334 def_id,
340335 trait_item_def_id: Some(trait_assoc_def_id.to_def_id()),
341336 container: ty::ImplContainer,
342337 fn_has_self_parameter: false,
338+ opt_rpitit_info: Some(ImplTraitInTraitData::Impl { fn_def_id: impl_fn_def_id.to_def_id() }),
343339 });
344340
345341 // Copy param_env of the containing function. The synthesized associated type doesn't have
0 commit comments