X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_typeck%2Fsrc%2Fhir_wf_check.rs;h=7b709b302f630a0b0369f32c5f9c9f84acf4e7fc;hb=770ee32b34a5b7e46185c7104d42ee1c51fe4257;hp=7d1aedc86008b7b60bfe90703b02a9f75afc3180;hpb=55d55136629ddafa712480a6937a2d3654ce3c55;p=rust.git diff --git a/compiler/rustc_typeck/src/hir_wf_check.rs b/compiler/rustc_typeck/src/hir_wf_check.rs index 7d1aedc8600..7b709b302f6 100644 --- a/compiler/rustc_typeck/src/hir_wf_check.rs +++ b/compiler/rustc_typeck/src/hir_wf_check.rs @@ -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 } } }