@@ -16,7 +16,6 @@ use rustc_errors::struct_span_err;
1616use rustc_hir as hir;
1717use rustc_hir:: def:: DefKind ;
1818use rustc_hir:: def_id:: LocalDefId ;
19- use rustc_hir:: itemlikevisit:: ItemLikeVisitor ;
2019use rustc_middle:: ty:: query:: Providers ;
2120use rustc_middle:: ty:: { self , TyCtxt , TypeFoldable } ;
2221use rustc_span:: Span ;
@@ -83,29 +82,6 @@ pub fn provide(providers: &mut Providers) {
8382 * providers = Providers { check_mod_impl_wf, ..* providers } ;
8483}
8584
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-
10985fn enforce_impl_params_are_constrained (
11086 tcx : TyCtxt < ' _ > ,
11187 impl_def_id : LocalDefId ,
0 commit comments