Skip to content

Commit 948f77c

Browse files
committed
tweak debug output some more
1 parent 62b1e65 commit 948f77c

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/librustc_mir/borrow_check/nll/region_infer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
352352
}
353353

354354
/// Returns access to the value of `r` for debugging purposes.
355-
pub(super) fn region_value_str(&self, r: RegionVid) -> String {
355+
crate fn region_value_str(&self, r: RegionVid) -> String {
356356
let inferred_values = self.inferred_values
357357
.as_ref()
358358
.expect("region values not yet inferred");

src/librustc_mir/dataflow/impls/borrows.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,13 @@ fn precompute_borrows_out_of_scope<'a, 'tcx>(
6666
let mut visited = FxHashSet();
6767
visited.insert(location);
6868

69-
debug!("borrow {:?} (region: {:?}) starts at {:?}",
70-
borrow_index, borrow_region, location);
69+
debug!(
70+
"borrow {:?} has region {:?} with value {:?}",
71+
borrow_index,
72+
borrow_region,
73+
regioncx.region_value_str(borrow_region),
74+
);
75+
debug!("borrow {:?} starts at {:?}", borrow_index, location);
7176
while let Some(location) = stack.pop() {
7277
// If region does not contain a point at the location, then add to list and skip
7378
// successor locations.

0 commit comments

Comments
 (0)