@@ -15,6 +15,7 @@ use rustc_middle::ty::error::{ExpectedFound, TypeError};
1515use rustc_middle:: ty:: {
1616 self , BottomUpFolder , GenericArgs , GenericParamDefKind , Ty , TyCtxt , TypeFoldable , TypeFolder ,
1717 TypeSuperFoldable , TypeVisitable , TypeVisitableExt , TypeVisitor , TypingMode , Upcast ,
18+ associated_types_for_impl_traits_in_associated_fn,
1819} ;
1920use rustc_middle:: { bug, span_bug} ;
2021use rustc_span:: { DUMMY_SP , Span } ;
@@ -757,7 +758,7 @@ pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
757758 // returning `-> Missing<impl Sized>`, that gets converted to `-> {type error}`,
758759 // and when walking through the signature we end up never collecting the def id
759760 // of the `impl Sized`. Insert that here, so we don't ICE later.
760- for assoc_item in tcx . associated_types_for_impl_traits_in_associated_fn ( trait_m. def_id ) {
761+ for assoc_item in associated_types_for_impl_traits_in_associated_fn ( tcx , trait_m. def_id ) {
761762 if !remapped_types. contains_key ( assoc_item) {
762763 remapped_types. insert (
763764 * assoc_item,
@@ -2448,8 +2449,7 @@ fn param_env_with_gat_bounds<'tcx>(
24482449 ty:: ImplTraitInTraitData :: Impl { fn_def_id }
24492450 | ty:: ImplTraitInTraitData :: Trait { fn_def_id, .. } ,
24502451 ) ,
2451- } => tcx
2452- . associated_types_for_impl_traits_in_associated_fn ( fn_def_id)
2452+ } => associated_types_for_impl_traits_in_associated_fn ( tcx, fn_def_id)
24532453 . iter ( )
24542454 . map ( |def_id| tcx. associated_item ( * def_id) )
24552455 . collect ( ) ,
0 commit comments