@@ -172,9 +172,10 @@ impl LivenessValues {
172172 . take_while ( move |& p| self . elements . point_in_range ( p) )
173173 }
174174
175- /// Returns a "pretty" string value of the region. Meant for debugging.
175+ /// For debugging purposes, returns a pretty-printed string of the points where the `region` is
176+ /// live.
176177 pub ( crate ) fn region_value_str ( & self , region : RegionVid ) -> String {
177- region_value_str (
178+ pretty_print_region_elements (
178179 self . live_points ( region) . map ( |p| RegionElement :: Location ( self . elements . to_location ( p) ) ) ,
179180 )
180181 }
@@ -378,7 +379,7 @@ impl<N: Idx> RegionValues<N> {
378379
379380 /// Returns a "pretty" string value of the region. Meant for debugging.
380381 pub ( crate ) fn region_value_str ( & self , r : N ) -> String {
381- region_value_str ( self . elements_contained_in ( r) )
382+ pretty_print_region_elements ( self . elements_contained_in ( r) )
382383 }
383384}
384385
@@ -422,11 +423,12 @@ impl ToElementIndex for ty::PlaceholderRegion {
422423 }
423424}
424425
425- pub ( crate ) fn location_set_str (
426+ /// For debugging purposes, returns a pretty-printed string of the given points.
427+ pub ( crate ) fn pretty_print_points (
426428 elements : & RegionValueElements ,
427429 points : impl IntoIterator < Item = PointIndex > ,
428430) -> String {
429- region_value_str (
431+ pretty_print_region_elements (
430432 points
431433 . into_iter ( )
432434 . take_while ( |& p| elements. point_in_range ( p) )
@@ -435,7 +437,8 @@ pub(crate) fn location_set_str(
435437 )
436438}
437439
438- fn region_value_str ( elements : impl IntoIterator < Item = RegionElement > ) -> String {
440+ /// For debugging purposes, returns a pretty-printed string of the given region elements.
441+ fn pretty_print_region_elements ( elements : impl IntoIterator < Item = RegionElement > ) -> String {
439442 let mut result = String :: new ( ) ;
440443 result. push ( '{' ) ;
441444
0 commit comments