@@ -2564,7 +2564,7 @@ impl Type {
25642564 krate : Crate ,
25652565 traits_in_scope : & FxHashSet < TraitId > ,
25662566 name : Option < & Name > ,
2567- mut callback : impl FnMut ( & Ty , Function ) -> Option < T > ,
2567+ mut callback : impl FnMut ( Type , Function ) -> Option < T > ,
25682568 ) -> Option < T > {
25692569 let _p = profile:: span ( "iterate_method_candidates" ) ;
25702570 let mut slot = None ;
@@ -2575,7 +2575,7 @@ impl Type {
25752575 name,
25762576 & mut |ty, assoc_item_id| match assoc_item_id {
25772577 AssocItemId :: FunctionId ( it) => {
2578- slot = callback ( ty , it. into ( ) ) ;
2578+ slot = callback ( self . derived ( ty . clone ( ) ) , it. into ( ) ) ;
25792579 slot. is_some ( )
25802580 }
25812581 AssocItemId :: ConstId ( _) | AssocItemId :: TypeAliasId ( _) => false ,
@@ -2620,7 +2620,7 @@ impl Type {
26202620 krate : Crate ,
26212621 traits_in_scope : & FxHashSet < TraitId > ,
26222622 name : Option < & Name > ,
2623- mut callback : impl FnMut ( & Ty , AssocItem ) -> Option < T > ,
2623+ mut callback : impl FnMut ( Type , AssocItem ) -> Option < T > ,
26242624 ) -> Option < T > {
26252625 let _p = profile:: span ( "iterate_path_candidates" ) ;
26262626 let mut slot = None ;
@@ -2630,7 +2630,7 @@ impl Type {
26302630 traits_in_scope,
26312631 name,
26322632 & mut |ty, assoc_item_id| {
2633- slot = callback ( ty , assoc_item_id. into ( ) ) ;
2633+ slot = callback ( self . derived ( ty . clone ( ) ) , assoc_item_id. into ( ) ) ;
26342634 slot. is_some ( )
26352635 } ,
26362636 ) ;
0 commit comments