@@ -80,8 +80,12 @@ impl<'a, 'tcx, 'rcx> AutoTraitFinder<'a, 'tcx, 'rcx> {
8080 self . get_auto_trait_impls ( did, & def_ctor, Some ( name) )
8181 }
8282
83- fn get_real_ty < F > ( & self , def_id : DefId , def_ctor : & F , real_name : & Option < Ident > ,
84- generics : & ty:: Generics ) -> hir:: Ty
83+ fn get_real_ty < F > ( & self ,
84+ def_id : DefId ,
85+ def_ctor : & F ,
86+ real_name : & Option < Ident > ,
87+ generics : & ty:: Generics ,
88+ ) -> hir:: Ty
8589 where F : Fn ( DefId ) -> Def {
8690 let path = get_path_for_type ( self . cx . tcx , def_id, def_ctor) ;
8791 let mut segments = path. segments . into_vec ( ) ;
@@ -151,11 +155,9 @@ impl<'a, 'tcx, 'rcx> AutoTraitFinder<'a, 'tcx, 'rcx> {
151155 let generics = infcx. tcx . generics_of ( impl_def_id) ;
152156 let trait_ref = infcx. tcx . impl_trait_ref ( impl_def_id) . unwrap ( ) ;
153157
154- if !match infcx. tcx . type_of ( impl_def_id) . sty {
155- :: rustc:: ty:: TypeVariants :: TyParam ( _) => true ,
156- _ => false ,
157- } {
158- return
158+ match infcx. tcx . type_of ( impl_def_id) . sty {
159+ :: rustc:: ty:: TypeVariants :: TyParam ( _) => { } ,
160+ _ => return ,
159161 }
160162
161163 let substs = infcx. fresh_substs_for_item ( DUMMY_SP , def_id) ;
0 commit comments