Skip to content

Commit

Permalink
tweak debug output some more
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed May 29, 2018
1 parent 62b1e65 commit 948f77c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/librustc_mir/borrow_check/nll/region_infer/mod.rs
Expand Up @@ -352,7 +352,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
}

/// Returns access to the value of `r` for debugging purposes.
pub(super) fn region_value_str(&self, r: RegionVid) -> String {
crate fn region_value_str(&self, r: RegionVid) -> String {
let inferred_values = self.inferred_values
.as_ref()
.expect("region values not yet inferred");
Expand Down
9 changes: 7 additions & 2 deletions src/librustc_mir/dataflow/impls/borrows.rs
Expand Up @@ -66,8 +66,13 @@ fn precompute_borrows_out_of_scope<'a, 'tcx>(
let mut visited = FxHashSet();
visited.insert(location);

debug!("borrow {:?} (region: {:?}) starts at {:?}",
borrow_index, borrow_region, location);
debug!(
"borrow {:?} has region {:?} with value {:?}",
borrow_index,
borrow_region,
regioncx.region_value_str(borrow_region),
);
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.
Expand Down

0 comments on commit 948f77c

Please sign in to comment.