@@ -153,6 +153,7 @@ fn associated_item_from_trait_item_ref(trait_item_ref: &hir::TraitItemRef) -> ty
153
153
trait_item_def_id : Some ( owner_id. to_def_id ( ) ) ,
154
154
container : ty:: TraitContainer ,
155
155
fn_has_self_parameter : has_self,
156
+ opt_rpitit_info : None ,
156
157
}
157
158
}
158
159
@@ -171,6 +172,7 @@ fn associated_item_from_impl_item_ref(impl_item_ref: &hir::ImplItemRef) -> ty::A
171
172
trait_item_def_id : impl_item_ref. trait_item_def_id ,
172
173
container : ty:: ImplContainer ,
173
174
fn_has_self_parameter : has_self,
175
+ opt_rpitit_info : None ,
174
176
}
175
177
}
176
178
@@ -262,19 +264,17 @@ fn associated_item_for_impl_trait_in_trait(
262
264
// Copy span of the opaque.
263
265
trait_assoc_ty. def_ident_span ( Some ( span) ) ;
264
266
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
-
271
267
trait_assoc_ty. associated_item ( ty:: AssocItem {
272
268
name : kw:: Empty ,
273
269
kind : ty:: AssocKind :: Type ,
274
270
def_id,
275
271
trait_item_def_id : None ,
276
272
container : ty:: TraitContainer ,
277
273
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
+ } ) ,
278
278
} ) ;
279
279
280
280
// Copy visility of the containing function.
@@ -328,18 +328,14 @@ fn impl_associated_item_for_impl_trait_in_trait(
328
328
// `opt_local_def_id_to_hir_id` with `None`.
329
329
impl_assoc_ty. opt_local_def_id_to_hir_id ( None ) ;
330
330
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
-
336
331
impl_assoc_ty. associated_item ( ty:: AssocItem {
337
332
name : kw:: Empty ,
338
333
kind : ty:: AssocKind :: Type ,
339
334
def_id,
340
335
trait_item_def_id : Some ( trait_assoc_def_id. to_def_id ( ) ) ,
341
336
container : ty:: ImplContainer ,
342
337
fn_has_self_parameter : false ,
338
+ opt_rpitit_info : Some ( ImplTraitInTraitData :: Impl { fn_def_id : impl_fn_def_id. to_def_id ( ) } ) ,
343
339
} ) ;
344
340
345
341
// Copy param_env of the containing function. The synthesized associated type doesn't have
0 commit comments