diff --git a/src/librustc_mir/borrow_check/nll/mod.rs b/src/librustc_mir/borrow_check/nll/mod.rs index 262d4a5cd3d..f54d80d5f4f 100644 --- a/src/librustc_mir/borrow_check/nll/mod.rs +++ b/src/librustc_mir/borrow_check/nll/mod.rs @@ -12,8 +12,8 @@ use borrow_check::borrow_set::BorrowSet; use borrow_check::location::{LocationIndex, LocationTable}; use borrow_check::nll::facts::AllFactsExt; use borrow_check::nll::type_check::{MirTypeckResults, MirTypeckRegionConstraints}; +use borrow_check::nll::type_check::liveness::liveness_map::{NllLivenessMap, LocalWithRegion}; use borrow_check::nll::region_infer::values::RegionValueElements; -use borrow_check::nll::liveness_map::{NllLivenessMap, LocalWithRegion}; use dataflow::indexes::BorrowIndex; use dataflow::move_paths::MoveData; use dataflow::FlowAtLocation; @@ -47,7 +47,6 @@ crate mod region_infer; mod renumber; crate mod type_check; mod universal_regions; -crate mod liveness_map; mod constraints; diff --git a/src/librustc_mir/borrow_check/nll/liveness_map.rs b/src/librustc_mir/borrow_check/nll/type_check/liveness/liveness_map.rs similarity index 100% rename from src/librustc_mir/borrow_check/nll/liveness_map.rs rename to src/librustc_mir/borrow_check/nll/type_check/liveness/liveness_map.rs diff --git a/src/librustc_mir/borrow_check/nll/type_check/liveness/mod.rs b/src/librustc_mir/borrow_check/nll/type_check/liveness/mod.rs index f15881ee3c8..7b52bb65c18 100644 --- a/src/librustc_mir/borrow_check/nll/type_check/liveness/mod.rs +++ b/src/librustc_mir/borrow_check/nll/type_check/liveness/mod.rs @@ -25,6 +25,8 @@ use util::liveness::{LivenessResults, LiveVariableMap }; use super::TypeChecker; +crate mod liveness_map; + /// Combines liveness analysis with initialization analysis to /// determine which variables are live at which points, both due to /// ordinary uses and drops. Returns a set of (ty, location) pairs diff --git a/src/librustc_mir/borrow_check/nll/type_check/mod.rs b/src/librustc_mir/borrow_check/nll/type_check/mod.rs index 4ca84df445e..eb689f0a9c6 100644 --- a/src/librustc_mir/borrow_check/nll/type_check/mod.rs +++ b/src/librustc_mir/borrow_check/nll/type_check/mod.rs @@ -15,10 +15,10 @@ use borrow_check::borrow_set::BorrowSet; use borrow_check::location::LocationTable; use borrow_check::nll::constraints::{ConstraintSet, OutlivesConstraint}; use borrow_check::nll::facts::AllFacts; -use borrow_check::nll::liveness_map::NllLivenessMap; use borrow_check::nll::region_infer::values::{RegionValueElements, LivenessValues}; use borrow_check::nll::region_infer::{ClosureRegionRequirementsExt, TypeTest}; use borrow_check::nll::type_check::free_region_relations::{CreateResult, UniversalRegionRelations}; +use borrow_check::nll::type_check::liveness::liveness_map::NllLivenessMap; use borrow_check::nll::universal_regions::UniversalRegions; use borrow_check::nll::LocalWithRegion; use borrow_check::nll::ToRegionVid; @@ -75,7 +75,7 @@ macro_rules! span_mirbug_and_err { mod constraint_conversion; pub mod free_region_relations; mod input_output; -mod liveness; +crate mod liveness; mod relate_tys; /// Type checks the given `mir` in the context of the inference