Skip to content

Commit 1b07c4a

Browse files
committed
remove ImplWfCheck
Signed-off-by: Miguel Guarniz <[email protected]>
1 parent dfe0746 commit 1b07c4a

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

compiler/rustc_typeck/src/impl_wf_check.rs

-24
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ use rustc_errors::struct_span_err;
1616
use rustc_hir as hir;
1717
use rustc_hir::def::DefKind;
1818
use rustc_hir::def_id::LocalDefId;
19-
use rustc_hir::itemlikevisit::ItemLikeVisitor;
2019
use rustc_middle::ty::query::Providers;
2120
use rustc_middle::ty::{self, TyCtxt, TypeFoldable};
2221
use 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-
10985
fn enforce_impl_params_are_constrained(
11086
tcx: TyCtxt<'_>,
11187
impl_def_id: LocalDefId,

0 commit comments

Comments
 (0)