diff options
author | Niko Matsakis <niko@alum.mit.edu> | 2018-05-29 15:09:37 -0400 |
---|---|---|
committer | Niko Matsakis <niko@alum.mit.edu> | 2018-05-29 15:09:37 -0400 |
commit | 948f77c71ff8fdfda0bec2f335498e8de075799a (patch) | |
tree | b0567de54186964e77cced7510d2bf0d97052f0a | |
parent | Ensure that all statements in block are visited not just successors of a block. (diff) | |
download | grust-948f77c71ff8fdfda0bec2f335498e8de075799a.tar.gz grust-948f77c71ff8fdfda0bec2f335498e8de075799a.tar.bz2 grust-948f77c71ff8fdfda0bec2f335498e8de075799a.tar.xz |
tweak debug output some more
-rw-r--r-- | src/librustc_mir/borrow_check/nll/region_infer/mod.rs | 2 | ||||
-rw-r--r-- | src/librustc_mir/dataflow/impls/borrows.rs | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/librustc_mir/borrow_check/nll/region_infer/mod.rs b/src/librustc_mir/borrow_check/nll/region_infer/mod.rs index 5a1ab73b2b..dea2683789 100644 --- a/src/librustc_mir/borrow_check/nll/region_infer/mod.rs +++ b/src/librustc_mir/borrow_check/nll/region_infer/mod.rs | |||
@@ -352,7 +352,7 @@ impl<'tcx> RegionInferenceContext<'tcx> { | |||
352 | } | 352 | } |
353 | 353 | ||
354 | /// Returns access to the value of `r` for debugging purposes. | 354 | /// 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 { |
356 | let inferred_values = self.inferred_values | 356 | let inferred_values = self.inferred_values |
357 | .as_ref() | 357 | .as_ref() |
358 | .expect("region values not yet inferred"); | 358 | .expect("region values not yet inferred"); |
diff --git a/src/librustc_mir/dataflow/impls/borrows.rs b/src/librustc_mir/dataflow/impls/borrows.rs index b8949e0ad0..59ff12efac 100644 --- a/src/librustc_mir/dataflow/impls/borrows.rs +++ b/src/librustc_mir/dataflow/impls/borrows.rs | |||
@@ -66,8 +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 {:?} (region: {:?}) starts at {:?}", | 69 | debug!( |
70 | borrow_index, borrow_region, location); | 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); | ||
71 | while let Some(location) = stack.pop() { | 76 | while let Some(location) = stack.pop() { |
72 | // If region does not contain a point at the location, then add to list and skip | 77 | // If region does not contain a point at the location, then add to list and skip |
73 | // successor locations. | 78 | // successor locations. |