@@ -90,7 +90,11 @@ impl RegionHighlightMode {
90
90
/// During the execution of `op`, highlight the region inference
91
91
/// vairable `vid` as `'N`. We can only highlight one region vid
92
92
/// 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 {
94
98
let old_mode = Self :: get ( ) ;
95
99
let mut new_mode = old_mode;
96
100
let first_avail_slot = new_mode. highlight_regions . iter_mut ( )
@@ -1076,12 +1080,10 @@ impl fmt::Debug for ty::FloatVid {
1076
1080
1077
1081
impl fmt:: Debug for ty:: RegionVid {
1078
1082
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, "'_" ) ;
1085
1087
}
1086
1088
1087
1089
write ! ( f, "'_#{}r" , self . index( ) )
0 commit comments