summaryrefslogtreecommitdiffstats
path: root/src/librustc_mir/borrow_check/mod.rs
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2018-05-01 10:03:36 -0400
committerNiko Matsakis <niko@alum.mit.edu>2018-05-05 05:03:56 -0400
commit74bb9171cc50cbe560b2e780dbb1a1c2285d7886 (patch)
tree5dc4c78798a675bd10e24a1e702d946ca1304e1a /src/librustc_mir/borrow_check/mod.rs
parentadd `Locations::All` as a concept (diff)
downloadgrust-74bb9171cc50cbe560b2e780dbb1a1c2285d7886.tar.gz
grust-74bb9171cc50cbe560b2e780dbb1a1c2285d7886.tar.bz2
grust-74bb9171cc50cbe560b2e780dbb1a1c2285d7886.tar.xz
add location table
This will be used in fact generation.
Diffstat (limited to 'src/librustc_mir/borrow_check/mod.rs')
-rw-r--r--src/librustc_mir/borrow_check/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/librustc_mir/borrow_check/mod.rs b/src/librustc_mir/borrow_check/mod.rs
index c619f350f5..3e3f510e30 100644
--- a/src/librustc_mir/borrow_check/mod.rs
+++ b/src/librustc_mir/borrow_check/mod.rs
@@ -50,12 +50,14 @@ use std::iter;
50 50
51use self::borrow_set::{BorrowSet, BorrowData}; 51use self::borrow_set::{BorrowSet, BorrowData};
52use self::flows::Flows; 52use self::flows::Flows;
53use self::location::LocationTable;
53use self::prefixes::PrefixSet; 54use self::prefixes::PrefixSet;
54use self::MutateMode::{JustWrite, WriteAndRead}; 55use self::MutateMode::{JustWrite, WriteAndRead};
55 56
56crate mod borrow_set; 57crate mod borrow_set;
57mod error_reporting; 58mod error_reporting;
58mod flows; 59mod flows;
60mod location;
59crate mod place_ext; 61crate mod place_ext;
60mod prefixes; 62mod prefixes;
61 63
@@ -110,6 +112,7 @@ fn do_mir_borrowck<'a, 'gcx, 'tcx>(
110 let mut mir: Mir<'tcx> = input_mir.clone(); 112 let mut mir: Mir<'tcx> = input_mir.clone();
111 let free_regions = nll::replace_regions_in_mir(infcx, def_id, param_env, &mut mir); 113 let free_regions = nll::replace_regions_in_mir(infcx, def_id, param_env, &mut mir);
112 let mir = &mir; // no further changes 114 let mir = &mir; // no further changes
115 let location_table = &LocationTable::new(mir);
113 116
114 let move_data: MoveData<'tcx> = match MoveData::gather_moves(mir, tcx) { 117 let move_data: MoveData<'tcx> = match MoveData::gather_moves(mir, tcx) {
115 Ok(move_data) => move_data, 118 Ok(move_data) => move_data,
@@ -199,6 +202,7 @@ fn do_mir_borrowck<'a, 'gcx, 'tcx>(
199 def_id, 202 def_id,
200 free_regions, 203 free_regions,
201 mir, 204 mir,
205 location_table,
202 param_env, 206 param_env,
203 &mut flow_inits, 207 &mut flow_inits,
204 &mdpe.move_data, 208 &mdpe.move_data,