@@ -90,7 +90,11 @@ impl RegionHighlightMode {
9090 /// During the execution of `op`, highlight the region inference
9191 /// vairable `vid` as `'N`. We can only highlight one region vid
9292 /// at a time.
93- pub fn highlighting_region < R > ( region : ty:: Region < ' _ > , number : usize , op : impl FnOnce ( ) -> R ) -> R {
93+ pub fn highlighting_region < R > (
94+ region : ty:: Region < ' _ > ,
95+ number : usize ,
96+ op : impl FnOnce ( ) -> R ,
97+ ) -> R {
9498 let old_mode = Self :: get ( ) ;
9599 let mut new_mode = old_mode;
96100 let first_avail_slot = new_mode. highlight_regions . iter_mut ( )
@@ -1076,12 +1080,10 @@ impl fmt::Debug for ty::FloatVid {
10761080
10771081impl fmt:: Debug for ty:: RegionVid {
10781082 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
1079- if RegionHighlightMode :: get ( ) . any_region_vids_highlighted ( ) {
1080- if let Some ( counter) = RegionHighlightMode :: get ( ) . region_highlighted ( & ty:: ReVar ( * self ) ) {
1081- return write ! ( f, "'{:?}" , counter) ;
1082- } else {
1083- return write ! ( f, "'_" ) ;
1084- }
1083+ if let Some ( counter) = RegionHighlightMode :: get ( ) . region_highlighted ( & ty:: ReVar ( * self ) ) {
1084+ return write ! ( f, "'{:?}" , counter) ;
1085+ } else if RegionHighlightMode :: get ( ) . any_region_vids_highlighted ( ) {
1086+ return write ! ( f, "'_" ) ;
10851087 }
10861088
10871089 write ! ( f, "'_#{}r" , self . index( ) )
0 commit comments