@@ -80,8 +80,12 @@ impl<'a, 'tcx, 'rcx> AutoTraitFinder<'a, 'tcx, 'rcx> {
80
80
self . get_auto_trait_impls ( did, & def_ctor, Some ( name) )
81
81
}
82
82
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
85
89
where F : Fn ( DefId ) -> Def {
86
90
let path = get_path_for_type ( self . cx . tcx , def_id, def_ctor) ;
87
91
let mut segments = path. segments . into_vec ( ) ;
@@ -151,11 +155,9 @@ impl<'a, 'tcx, 'rcx> AutoTraitFinder<'a, 'tcx, 'rcx> {
151
155
let generics = infcx. tcx . generics_of ( impl_def_id) ;
152
156
let trait_ref = infcx. tcx . impl_trait_ref ( impl_def_id) . unwrap ( ) ;
153
157
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 ,
159
161
}
160
162
161
163
let substs = infcx. fresh_substs_for_item ( DUMMY_SP , def_id) ;
0 commit comments