@@ -16,7 +16,6 @@ use rustc_errors::struct_span_err;
16
16
use rustc_hir as hir;
17
17
use rustc_hir:: def:: DefKind ;
18
18
use rustc_hir:: def_id:: LocalDefId ;
19
- use rustc_hir:: itemlikevisit:: ItemLikeVisitor ;
20
19
use rustc_middle:: ty:: query:: Providers ;
21
20
use rustc_middle:: ty:: { self , TyCtxt , TypeFoldable } ;
22
21
use rustc_span:: Span ;
@@ -83,29 +82,6 @@ pub fn provide(providers: &mut Providers) {
83
82
* providers = Providers { check_mod_impl_wf, ..* providers } ;
84
83
}
85
84
86
- struct ImplWfCheck < ' tcx > {
87
- tcx : TyCtxt < ' tcx > ,
88
- min_specialization : bool ,
89
- }
90
-
91
- impl < ' tcx > ItemLikeVisitor < ' tcx > for ImplWfCheck < ' tcx > {
92
- fn visit_item ( & mut self , item : & ' tcx hir:: Item < ' tcx > ) {
93
- if let hir:: ItemKind :: Impl ( ref impl_) = item. kind {
94
- enforce_impl_params_are_constrained ( self . tcx , item. def_id , impl_. items ) ;
95
- enforce_impl_items_are_distinct ( self . tcx , impl_. items ) ;
96
- if self . min_specialization {
97
- check_min_specialization ( self . tcx , item. def_id . to_def_id ( ) , item. span ) ;
98
- }
99
- }
100
- }
101
-
102
- fn visit_trait_item ( & mut self , _trait_item : & ' tcx hir:: TraitItem < ' tcx > ) { }
103
-
104
- fn visit_impl_item ( & mut self , _impl_item : & ' tcx hir:: ImplItem < ' tcx > ) { }
105
-
106
- fn visit_foreign_item ( & mut self , _foreign_item : & ' tcx hir:: ForeignItem < ' tcx > ) { }
107
- }
108
-
109
85
fn enforce_impl_params_are_constrained (
110
86
tcx : TyCtxt < ' _ > ,
111
87
impl_def_id : LocalDefId ,
0 commit comments