From 9c637144f5e7761e04c62232a69993c30b5b797f Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Tue, 29 May 2018 14:03:26 -0400 Subject: [PATCH] add some debugging statements --- src/librustc_mir/dataflow/impls/borrows.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/librustc_mir/dataflow/impls/borrows.rs b/src/librustc_mir/dataflow/impls/borrows.rs index af6eb517b1e..bd16e3ac5ff 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>( let mut visited = FxHashSet(); visited.insert(location); + debug!("borrow {:?} starts at {:?}", borrow_index, location); + while let Some(location) = stack.pop() { // If region does not contain a point at the location, then add to list and skip // successor locations. if !regioncx.region_contains_point(borrow_region, location) { + debug!("borrow {:?} gets killed at {:?}", borrow_index, location); borrows_out_of_scope_at_location .entry(location) .or_insert(vec![])