]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_typeck/src/check/mod.rs
RegionCtxt merged `body_id` with `body_owner`
[rust.git] / compiler / rustc_typeck / src / check / mod.rs
index e26f211c1c189724ec614fb03c550e1d3c797952..028df78e6bdad958d50f89ccebfb60e866df991c 100644 (file)
 mod wfcheck;
 pub mod writeback;
 
-use check::{
-    check_abi, check_fn, check_impl_item_well_formed, check_item_well_formed, check_mod_item_types,
-    check_trait_item_well_formed,
-};
-pub use check::{check_item_type, check_wf_new};
+use check::{check_abi, check_fn, check_mod_item_types};
 pub use diverges::Diverges;
 pub use expectation::Expectation;
 pub use fn_ctxt::*;
@@ -245,6 +241,7 @@ fn opt_find_breakable(&mut self, target_id: hir::HirId) -> Option<&mut Breakable
 
 pub fn provide(providers: &mut Providers) {
     method::provide(providers);
+    wfcheck::provide(providers);
     *providers = Providers {
         typeck_item_bodies,
         typeck_const_arg,
@@ -253,9 +250,6 @@ pub fn provide(providers: &mut Providers) {
         has_typeck_results,
         adt_destructor,
         used_trait_imports,
-        check_item_well_formed,
-        check_trait_item_well_formed,
-        check_impl_item_well_formed,
         check_mod_item_types,
         region_scope_tree,
         ..*providers
@@ -499,7 +493,7 @@ fn typeck_with_fallback<'tcx>(
         if fn_sig.is_some() {
             fcx.regionck_fn(id, body, span, wf_tys);
         } else {
-            fcx.regionck_expr(body);
+            fcx.regionck_body(body);
         }
 
         fcx.resolve_type_vars_in_body(body)