@@ -176,9 +176,10 @@ impl LivenessValues {
176
176
. take_while ( move |& p| self . elements . point_in_range ( p) )
177
177
}
178
178
179
- /// Returns a "pretty" string value of the region. Meant for debugging.
179
+ /// For debugging purposes, returns a pretty-printed string of the points where the `region` is
180
+ /// live.
180
181
pub ( crate ) fn region_value_str ( & self , region : RegionVid ) -> String {
181
- region_value_str (
182
+ pretty_print_region_elements (
182
183
self . live_points ( region)
183
184
. map ( move |p| RegionElement :: Location ( self . elements . to_location ( p) ) ) ,
184
185
)
@@ -383,7 +384,7 @@ impl<N: Idx> RegionValues<N> {
383
384
384
385
/// Returns a "pretty" string value of the region. Meant for debugging.
385
386
pub ( crate ) fn region_value_str ( & self , r : N ) -> String {
386
- region_value_str ( self . elements_contained_in ( r) )
387
+ pretty_print_region_elements ( self . elements_contained_in ( r) )
387
388
}
388
389
}
389
390
@@ -427,11 +428,12 @@ impl ToElementIndex for ty::PlaceholderRegion {
427
428
}
428
429
}
429
430
430
- pub ( crate ) fn location_set_str (
431
+ /// For debugging purposes, returns a pretty-printed string of the given points.
432
+ pub ( crate ) fn pretty_print_points (
431
433
elements : & RegionValueElements ,
432
434
points : impl IntoIterator < Item = PointIndex > ,
433
435
) -> String {
434
- region_value_str (
436
+ pretty_print_region_elements (
435
437
points
436
438
. into_iter ( )
437
439
. take_while ( |& p| elements. point_in_range ( p) )
@@ -440,7 +442,8 @@ pub(crate) fn location_set_str(
440
442
)
441
443
}
442
444
443
- fn region_value_str ( elements : impl IntoIterator < Item = RegionElement > ) -> String {
445
+ /// For debugging purposes, returns a pretty-printed string of the given region elements.
446
+ fn pretty_print_region_elements ( elements : impl IntoIterator < Item = RegionElement > ) -> String {
444
447
let mut result = String :: new ( ) ;
445
448
result. push ( '{' ) ;
446
449
0 commit comments