@@ -176,9 +176,10 @@ impl LivenessValues {
176176 . take_while ( move |& p| self . elements . point_in_range ( p) )
177177 }
178178
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.
180181 pub ( crate ) fn region_value_str ( & self , region : RegionVid ) -> String {
181- region_value_str (
182+ pretty_print_region_elements (
182183 self . live_points ( region)
183184 . map ( move |p| RegionElement :: Location ( self . elements . to_location ( p) ) ) ,
184185 )
@@ -383,7 +384,7 @@ impl<N: Idx> RegionValues<N> {
383384
384385 /// Returns a "pretty" string value of the region. Meant for debugging.
385386 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) )
387388 }
388389}
389390
@@ -427,11 +428,12 @@ impl ToElementIndex for ty::PlaceholderRegion {
427428 }
428429}
429430
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 (
431433 elements : & RegionValueElements ,
432434 points : impl IntoIterator < Item = PointIndex > ,
433435) -> String {
434- region_value_str (
436+ pretty_print_region_elements (
435437 points
436438 . into_iter ( )
437439 . take_while ( |& p| elements. point_in_range ( p) )
@@ -440,7 +442,8 @@ pub(crate) fn location_set_str(
440442 )
441443}
442444
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 {
444447 let mut result = String :: new ( ) ;
445448 result. push ( '{' ) ;
446449
0 commit comments