@@ -634,7 +634,7 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
634
634
// that we don't end up with duplicate bounds (e.g., for<'b, 'b>)
635
635
for_generics. extend ( p. generic_params . clone ( ) ) ;
636
636
p. generic_params = for_generics. into_iter ( ) . collect ( ) ;
637
- self . is_fn_ty ( & tcx, & p. trait_ )
637
+ self . is_fn_ty ( tcx, & p. trait_ )
638
638
}
639
639
_ => false ,
640
640
} ;
@@ -681,7 +681,7 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
681
681
} => {
682
682
let mut new_trait_path = trait_path. clone ( ) ;
683
683
684
- if self . is_fn_ty ( & tcx, trait_) && left_name == FN_OUTPUT_NAME {
684
+ if self . is_fn_ty ( tcx, trait_) && left_name == FN_OUTPUT_NAME {
685
685
ty_to_fn
686
686
. entry ( * ty. clone ( ) )
687
687
. and_modify ( |e| * e = ( e. 0 . clone ( ) , Some ( rhs. clone ( ) ) ) )
@@ -850,7 +850,7 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
850
850
vec. sort_by_cached_key ( |x| format ! ( "{:?}" , x) )
851
851
}
852
852
853
- fn is_fn_ty ( & self , tcx : & TyCtxt < ' _ , ' _ , ' _ > , ty : & Type ) -> bool {
853
+ fn is_fn_ty ( & self , tcx : TyCtxt < ' _ , ' _ , ' _ > , ty : & Type ) -> bool {
854
854
match & ty {
855
855
& & Type :: ResolvedPath { ref did, .. } => {
856
856
* did == tcx. require_lang_item ( lang_items:: FnTraitLangItem )
0 commit comments