summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2018-05-29 14:03:26 -0400
committerNiko Matsakis <niko@alum.mit.edu>2018-05-29 14:03:26 -0400
commit9c637144f5e7761e04c62232a69993c30b5b797f (patch)
treebb0f7b01c465e186b962590afbe1291965fe2a16
parentRefactored DFS to be much cleaner. Added continue after noting that borrow is... (diff)
downloadgrust-9c637144f5e7761e04c62232a69993c30b5b797f.tar.gz
grust-9c637144f5e7761e04c62232a69993c30b5b797f.tar.bz2
grust-9c637144f5e7761e04c62232a69993c30b5b797f.tar.xz
add some debugging statements
-rw-r--r--src/librustc_mir/dataflow/impls/borrows.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librustc_mir/dataflow/impls/borrows.rs b/src/librustc_mir/dataflow/impls/borrows.rs
index af6eb517b1..bd16e3ac5f 100644
--- a/src/librustc_mir/dataflow/impls/borrows.rs
+++ b/src/librustc_mir/dataflow/impls/borrows.rs
@@ -66,10 +66,13 @@ fn precompute_borrows_out_of_scope<'a, 'tcx>(
66 let mut visited = FxHashSet(); 66 let mut visited = FxHashSet();
67 visited.insert(location); 67 visited.insert(location);
68 68
69 debug!("borrow {:?} starts at {:?}", borrow_index, location);
70
69 while let Some(location) = stack.pop() { 71 while let Some(location) = stack.pop() {
70 // If region does not contain a point at the location, then add to list and skip 72 // If region does not contain a point at the location, then add to list and skip
71 // successor locations. 73 // successor locations.
72 if !regioncx.region_contains_point(borrow_region, location) { 74 if !regioncx.region_contains_point(borrow_region, location) {
75 debug!("borrow {:?} gets killed at {:?}", borrow_index, location);
73 borrows_out_of_scope_at_location 76 borrows_out_of_scope_at_location
74 .entry(location) 77 .entry(location)
75 .or_insert(vec![]) 78 .or_insert(vec![])