summaryrefslogtreecommitdiffstats
path: root/src/librustc_mir/borrow_check/mod.rs
diff options
context:
space:
mode:
authorDouglas Campos <qmx@qmx.me>2018-05-26 01:38:50 +0000
committerSantiago Pastorino <spastorino@gmail.com>2018-05-29 10:19:46 -0300
commitdb39ec8f9acc5b1c597c6c3de4f3515c760ce06f (patch)
tree4064d187dba300f84fa8775d904d8c0001e5ed9a /src/librustc_mir/borrow_check/mod.rs
parentstore polonius output in MirBorrowCtx (diff)
downloadgrust-db39ec8f9acc5b1c597c6c3de4f3515c760ce06f.tar.gz
grust-db39ec8f9acc5b1c597c6c3de4f3515c760ce06f.tar.bz2
grust-db39ec8f9acc5b1c597c6c3de4f3515c760ce06f.tar.xz
store output in FlowState
Diffstat (limited to 'src/librustc_mir/borrow_check/mod.rs')
-rw-r--r--src/librustc_mir/borrow_check/mod.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/librustc_mir/borrow_check/mod.rs b/src/librustc_mir/borrow_check/mod.rs
index e2d696e9b0..983a2ac2ec 100644
--- a/src/librustc_mir/borrow_check/mod.rs
+++ b/src/librustc_mir/borrow_check/mod.rs
@@ -11,12 +11,11 @@
11//! This query borrow-checks the MIR to (further) ensure it is not broken. 11//! This query borrow-checks the MIR to (further) ensure it is not broken.
12 12
13use borrow_check::nll::region_infer::RegionInferenceContext; 13use borrow_check::nll::region_infer::RegionInferenceContext;
14use borrow_check::location::LocationIndex;
15use rustc::hir; 14use rustc::hir;
16use rustc::hir::def_id::DefId; 15use rustc::hir::def_id::DefId;
17use rustc::hir::map::definitions::DefPathData; 16use rustc::hir::map::definitions::DefPathData;
18use rustc::infer::InferCtxt; 17use rustc::infer::InferCtxt;
19use rustc::ty::{self, ParamEnv, RegionVid, TyCtxt}; 18use rustc::ty::{self, ParamEnv, TyCtxt};
20use rustc::ty::maps::Providers; 19use rustc::ty::maps::Providers;
21use rustc::lint::builtin::UNUSED_MUT; 20use rustc::lint::builtin::UNUSED_MUT;
22use rustc::mir::{AggregateKind, BasicBlock, BorrowCheckResult, BorrowKind}; 21use rustc::mir::{AggregateKind, BasicBlock, BorrowCheckResult, BorrowKind};
@@ -46,7 +45,6 @@ use dataflow::move_paths::{IllegalMoveOriginKind, MoveError};
46use dataflow::move_paths::{HasMoveData, LookupResult, MoveData, MovePathIndex}; 45use dataflow::move_paths::{HasMoveData, LookupResult, MoveData, MovePathIndex};
47use util::borrowck_errors::{BorrowckErrors, Origin}; 46use util::borrowck_errors::{BorrowckErrors, Origin};
48use util::collect_writes::FindAssignments; 47use util::collect_writes::FindAssignments;
49use polonius_engine::Output;
50 48
51use self::borrow_set::{BorrowSet, BorrowData}; 49use self::borrow_set::{BorrowSet, BorrowData};
52use self::flows::Flows; 50use self::flows::Flows;
@@ -253,7 +251,6 @@ fn do_mir_borrowck<'a, 'gcx, 'tcx>(
253 used_mut_upvars: SmallVec::new(), 251 used_mut_upvars: SmallVec::new(),
254 borrow_set, 252 borrow_set,
255 dominators, 253 dominators,
256 polonius_output,
257 }; 254 };
258 255
259 let mut state = Flows::new( 256 let mut state = Flows::new(
@@ -262,6 +259,7 @@ fn do_mir_borrowck<'a, 'gcx, 'tcx>(
262 flow_uninits, 259 flow_uninits,
263 flow_move_outs, 260 flow_move_outs,
264 flow_ever_inits, 261 flow_ever_inits,
262 polonius_output,
265 ); 263 );
266 264
267 mbcx.analyze_results(&mut state); // entry point for DataflowResultsConsumer 265 mbcx.analyze_results(&mut state); // entry point for DataflowResultsConsumer
@@ -376,9 +374,6 @@ pub struct MirBorrowckCtxt<'cx, 'gcx: 'tcx, 'tcx: 'cx> {
376 374
377 /// Dominators for MIR 375 /// Dominators for MIR
378 dominators: Dominators<BasicBlock>, 376 dominators: Dominators<BasicBlock>,
379
380 /// Polonius Output
381 polonius_output: Option<Rc<Output<RegionVid, BorrowIndex, LocationIndex>>>,
382} 377}
383 378
384// Check that: 379// Check that: