tweak debug output some more

This commit is contained in:
Niko Matsakis 2018-05-29 15:09:37 -04:00
parent 62b1e6532a
commit 948f77c71f
2 changed files with 8 additions and 3 deletions
src/librustc_mir
borrow_check/nll/region_infer
dataflow/impls

@ -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");

@ -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.