1- // ignore-tidy-filelength
2-
31/*!
42
53# typeck: check phase
@@ -82,6 +80,7 @@ mod pat;
8280mod place_op;
8381mod regionck;
8482mod upvar;
83+ mod util;
8584mod wfcheck;
8685pub mod writeback;
8786
@@ -97,7 +96,7 @@ use rustc_errors::ErrorReported;
9796use rustc_errors:: { pluralize, struct_span_err, Applicability , DiagnosticBuilder , DiagnosticId } ;
9897use rustc_hir as hir;
9998use rustc_hir:: def:: { CtorOf , DefKind , Res } ;
100- use rustc_hir:: def_id:: { CrateNum , DefId , DefIdMap , LocalDefId , LOCAL_CRATE } ;
99+ use rustc_hir:: def_id:: { DefId , DefIdMap , LocalDefId , LOCAL_CRATE } ;
101100use rustc_hir:: intravisit:: { self , NestedVisitorMap , Visitor } ;
102101use rustc_hir:: itemlikevisit:: ItemLikeVisitor ;
103102use rustc_hir:: lang_items:: LangItem ;
@@ -738,31 +737,12 @@ pub fn check_wf_new(tcx: TyCtxt<'_>) {
738737 tcx. hir ( ) . krate ( ) . par_visit_all_item_likes ( & visit) ;
739738}
740739
741- fn check_mod_item_types ( tcx : TyCtxt < ' _ > , module_def_id : LocalDefId ) {
742- tcx. hir ( ) . visit_item_likes_in_module ( module_def_id, & mut CheckItemTypesVisitor { tcx } ) ;
743- }
744-
745- fn typeck_item_bodies ( tcx : TyCtxt < ' _ > , crate_num : CrateNum ) {
746- debug_assert ! ( crate_num == LOCAL_CRATE ) ;
747- tcx. par_body_owners ( |body_owner_def_id| {
748- tcx. ensure ( ) . typeck ( body_owner_def_id) ;
749- } ) ;
750- }
751-
752- fn check_item_well_formed ( tcx : TyCtxt < ' _ > , def_id : LocalDefId ) {
753- wfcheck:: check_item_well_formed ( tcx, def_id) ;
754- }
755-
756- fn check_trait_item_well_formed ( tcx : TyCtxt < ' _ > , def_id : LocalDefId ) {
757- wfcheck:: check_trait_item ( tcx, def_id) ;
758- }
759-
760- fn check_impl_item_well_formed ( tcx : TyCtxt < ' _ > , def_id : LocalDefId ) {
761- wfcheck:: check_impl_item ( tcx, def_id) ;
762- }
763-
764740pub fn provide ( providers : & mut Providers ) {
765741 method:: provide ( providers) ;
742+ use util:: {
743+ check_impl_item_well_formed, check_item_well_formed, check_mod_item_types,
744+ check_trait_item_well_formed, typeck_item_bodies,
745+ } ;
766746 * providers = Providers {
767747 typeck_item_bodies,
768748 typeck_const_arg,
0 commit comments