pacify the mercilous tidy
This commit is contained in:
parent
bc4404c0b5
commit
cf2f7cccb4
@ -90,7 +90,11 @@ pub fn maybe_highlighting_region<R>(
|
||||
/// During the execution of `op`, highlight the region inference
|
||||
/// vairable `vid` as `'N`. We can only highlight one region vid
|
||||
/// at a time.
|
||||
pub fn highlighting_region<R>(region: ty::Region<'_>, number: usize, op: impl FnOnce() -> R) -> R {
|
||||
pub fn highlighting_region<R>(
|
||||
region: ty::Region<'_>,
|
||||
number: usize,
|
||||
op: impl FnOnce() -> R,
|
||||
) -> R {
|
||||
let old_mode = Self::get();
|
||||
let mut new_mode = old_mode;
|
||||
let first_avail_slot = new_mode.highlight_regions.iter_mut()
|
||||
@ -1076,13 +1080,11 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
|
||||
impl fmt::Debug for ty::RegionVid {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
if RegionHighlightMode::get().any_region_vids_highlighted() {
|
||||
if let Some(counter) = RegionHighlightMode::get().region_highlighted(&ty::ReVar(*self)) {
|
||||
return write!(f, "'{:?}", counter);
|
||||
} else {
|
||||
} else if RegionHighlightMode::get().any_region_vids_highlighted() {
|
||||
return write!(f, "'_");
|
||||
}
|
||||
}
|
||||
|
||||
write!(f, "'_#{}r", self.index())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user