Skip to content

Commit cfa372b

Browse files
committed
Drive-by refactor: instrument now does this!
1 parent 679534e commit cfa372b

File tree

1 file changed

+3
-8
lines changed
  • compiler/rustc_borrowck/src/region_infer

1 file changed

+3
-8
lines changed

compiler/rustc_borrowck/src/region_infer/mod.rs

+3-8
Original file line numberDiff line numberDiff line change
@@ -1791,20 +1791,15 @@ impl<'tcx> RegionInferenceContext<'tcx> {
17911791
/// that cannot be named by `fr1`; in that case, we will require
17921792
/// that `fr1: 'static` because it is the only way to `fr1: r` to
17931793
/// be satisfied. (See `add_incompatible_universe`.)
1794+
#[instrument(skip(self), ret)]
17941795
pub(crate) fn provides_universal_region(
17951796
&self,
17961797
r: RegionVid,
17971798
fr1: RegionVid,
17981799
fr2: RegionVid,
17991800
) -> bool {
1800-
debug!("provides_universal_region(r={:?}, fr1={:?}, fr2={:?})", r, fr1, fr2);
1801-
let result = {
1802-
r == fr2 || {
1803-
fr2 == self.universal_regions.fr_static && self.cannot_name_placeholder(fr1, r)
1804-
}
1805-
};
1806-
debug!("provides_universal_region: result = {:?}", result);
1807-
result
1801+
let fr2_is_static = fr2 == self.universal_regions.fr_static;
1802+
r == fr2 || (fr2_is_static && self.cannot_name_placeholder(fr1, r))
18081803
}
18091804

18101805
/// If `r2` represents a placeholder region, then this returns

0 commit comments

Comments
 (0)