]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_typeck/src/hir_wf_check.rs
Rollup merge of #89793 - ibraheemdev:from_ptr_range, r=m-ou-se
[rust.git] / compiler / rustc_typeck / src / hir_wf_check.rs
index 7d1aedc86008b7b60bfe90703b02a9f75afc3180..7b709b302f630a0b0369f32c5f9c9f84acf4e7fc 100644 (file)
@@ -180,6 +180,6 @@ fn tcx<'a>(&'a self) -> TyCtxt<'tcx> {
         self.tcx
     }
     fn fold_region(&mut self, r: Region<'tcx>) -> Region<'tcx> {
-        if let ty::ReLateBound(..) = r { &ty::ReErased } else { r }
+        if r.is_late_bound() { self.tcx.lifetimes.re_erased } else { r }
     }
 }