@@ -176,11 +176,11 @@ 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- self . live_points ( region)
183- . map ( move |p| RegionElement :: Location ( self . elements . to_location ( p) ) ) ,
182+ pretty_print_region_elements (
183+ self . live_points ( region) . map ( |p| RegionElement :: Location ( self . elements . to_location ( p) ) ) ,
184184 )
185185 }
186186
@@ -383,7 +383,7 @@ impl<N: Idx> RegionValues<N> {
383383
384384 /// Returns a "pretty" string value of the region. Meant for debugging.
385385 pub ( crate ) fn region_value_str ( & self , r : N ) -> String {
386- region_value_str ( self . elements_contained_in ( r) )
386+ pretty_print_region_elements ( self . elements_contained_in ( r) )
387387 }
388388}
389389
@@ -427,11 +427,12 @@ impl ToElementIndex for ty::PlaceholderRegion {
427427 }
428428}
429429
430- pub ( crate ) fn location_set_str (
430+ /// For debugging purposes, returns a pretty-printed string of the given points.
431+ pub ( crate ) fn pretty_print_points (
431432 elements : & RegionValueElements ,
432433 points : impl IntoIterator < Item = PointIndex > ,
433434) -> String {
434- region_value_str (
435+ pretty_print_region_elements (
435436 points
436437 . into_iter ( )
437438 . take_while ( |& p| elements. point_in_range ( p) )
@@ -440,7 +441,8 @@ pub(crate) fn location_set_str(
440441 )
441442}
442443
443- fn region_value_str ( elements : impl IntoIterator < Item = RegionElement > ) -> String {
444+ /// For debugging purposes, returns a pretty-printed string of the given region elements.
445+ fn pretty_print_region_elements ( elements : impl IntoIterator < Item = RegionElement > ) -> String {
444446 let mut result = String :: new ( ) ;
445447 result. push ( '{' ) ;
446448
0 commit comments