mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-20 02:43:45 +00:00
remove ImplWfCheck
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
This commit is contained in:
parent
dfe07461f4
commit
1b07c4af81
@ -16,7 +16,6 @@ use rustc_errors::struct_span_err;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_hir::def_id::LocalDefId;
|
||||
use rustc_hir::itemlikevisit::ItemLikeVisitor;
|
||||
use rustc_middle::ty::query::Providers;
|
||||
use rustc_middle::ty::{self, TyCtxt, TypeFoldable};
|
||||
use rustc_span::Span;
|
||||
@ -83,29 +82,6 @@ pub fn provide(providers: &mut Providers) {
|
||||
*providers = Providers { check_mod_impl_wf, ..*providers };
|
||||
}
|
||||
|
||||
struct ImplWfCheck<'tcx> {
|
||||
tcx: TyCtxt<'tcx>,
|
||||
min_specialization: bool,
|
||||
}
|
||||
|
||||
impl<'tcx> ItemLikeVisitor<'tcx> for ImplWfCheck<'tcx> {
|
||||
fn visit_item(&mut self, item: &'tcx hir::Item<'tcx>) {
|
||||
if let hir::ItemKind::Impl(ref impl_) = item.kind {
|
||||
enforce_impl_params_are_constrained(self.tcx, item.def_id, impl_.items);
|
||||
enforce_impl_items_are_distinct(self.tcx, impl_.items);
|
||||
if self.min_specialization {
|
||||
check_min_specialization(self.tcx, item.def_id.to_def_id(), item.span);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn visit_trait_item(&mut self, _trait_item: &'tcx hir::TraitItem<'tcx>) {}
|
||||
|
||||
fn visit_impl_item(&mut self, _impl_item: &'tcx hir::ImplItem<'tcx>) {}
|
||||
|
||||
fn visit_foreign_item(&mut self, _foreign_item: &'tcx hir::ForeignItem<'tcx>) {}
|
||||
}
|
||||
|
||||
fn enforce_impl_params_are_constrained(
|
||||
tcx: TyCtxt<'_>,
|
||||
impl_def_id: LocalDefId,
|
||||
|
Loading…
Reference in New Issue
Block a user