@@ -15,6 +15,7 @@ use rustc_middle::ty::error::{ExpectedFound, TypeError};
15
15
use rustc_middle:: ty:: {
16
16
self , BottomUpFolder , GenericArgs , GenericParamDefKind , Ty , TyCtxt , TypeFoldable , TypeFolder ,
17
17
TypeSuperFoldable , TypeVisitable , TypeVisitableExt , TypeVisitor , TypingMode , Upcast ,
18
+ associated_types_for_impl_traits_in_associated_fn,
18
19
} ;
19
20
use rustc_middle:: { bug, span_bug} ;
20
21
use rustc_span:: { DUMMY_SP , Span } ;
@@ -757,7 +758,7 @@ pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
757
758
// returning `-> Missing<impl Sized>`, that gets converted to `-> {type error}`,
758
759
// and when walking through the signature we end up never collecting the def id
759
760
// 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 ) {
761
762
if !remapped_types. contains_key ( assoc_item) {
762
763
remapped_types. insert (
763
764
* assoc_item,
@@ -2448,8 +2449,7 @@ fn param_env_with_gat_bounds<'tcx>(
2448
2449
ty:: ImplTraitInTraitData :: Impl { fn_def_id }
2449
2450
| ty:: ImplTraitInTraitData :: Trait { fn_def_id, .. } ,
2450
2451
) ,
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)
2453
2453
. iter ( )
2454
2454
. map ( |def_id| tcx. associated_item ( * def_id) )
2455
2455
. collect ( ) ,
0 commit comments