Skip to content

Commit 1c57468

Browse files
committed
move type_check out of transform and into the nll module
1 parent fad3d1d commit 1c57468

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/librustc_mir/borrow_check/nll/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ use rustc::util::nodemap::FxHashMap;
1616
use std::collections::BTreeSet;
1717
use std::io;
1818
use transform::MirSource;
19-
use transform::type_check;
2019
use util::liveness::{self, LivenessMode, LivenessResult, LocalSet};
2120
use borrow_check::FlowAtLocation;
2221
use dataflow::MaybeInitializedLvals;
@@ -27,14 +26,15 @@ use util::pretty::{self, ALIGN};
2726
use self::mir_util::PassWhere;
2827

2928
mod constraint_generation;
29+
pub(crate) mod region_infer;
30+
mod renumber;
3031
mod subtype_constraint_generation;
32+
pub(crate) mod type_check;
3133
mod universal_regions;
32-
use self::universal_regions::UniversalRegions;
3334

34-
pub(crate) mod region_infer;
3535
use self::region_infer::RegionInferenceContext;
36+
use self::universal_regions::UniversalRegions;
3637

37-
mod renumber;
3838

3939
/// Rewrites the regions in the MIR to use NLL variables, also
4040
/// scraping out the set of universal regions (e.g., region parameters)

src/librustc_mir/borrow_check/nll/subtype_constraint_generation.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ use rustc::infer::region_constraints::RegionConstraintData;
1414
use rustc::infer::region_constraints::{Verify, VerifyBound};
1515
use rustc::ty;
1616
use syntax::codemap::Span;
17-
use transform::type_check::Locations;
18-
use transform::type_check::MirTypeckRegionConstraints;
19-
use transform::type_check::OutlivesSet;
2017

2118
use super::region_infer::{TypeTest, RegionInferenceContext, RegionTest};
19+
use super::type_check::Locations;
20+
use super::type_check::MirTypeckRegionConstraints;
21+
use super::type_check::OutlivesSet;
2222

2323
/// When the MIR type-checker executes, it validates all the types in
2424
/// the MIR, and in the process generates a set of constraints that

src/librustc_mir/transform/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
use borrow_check::nll::type_check;
1112
use build;
1213
use rustc::hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
1314
use rustc::mir::{Mir, Promoted};
@@ -30,7 +31,6 @@ pub mod simplify_branches;
3031
pub mod simplify;
3132
pub mod erase_regions;
3233
pub mod no_landing_pads;
33-
pub mod type_check;
3434
pub mod rustc_peek;
3535
pub mod elaborate_drops;
3636
pub mod add_call_guards;

0 commit comments

Comments
 (0)