]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_mir_transform/src/reveal_all.rs
Rollup merge of #90247 - newpavlov:duration_float_fract, r=nagisa
[rust.git] / compiler / rustc_mir_transform / src / reveal_all.rs
index a717dd3e0cd8a6686de92de311770ff0c179d7ec..ee661793a44aae74cc7f042cd140f94ad32d1db2 100644 (file)
@@ -36,6 +36,9 @@ fn tcx(&self) -> TyCtxt<'tcx> {
 
     #[inline]
     fn visit_ty(&mut self, ty: &mut Ty<'tcx>, _: TyContext) {
-        *ty = self.tcx.normalize_erasing_regions(self.param_env, ty);
+        // We have to use `try_normalize_erasing_regions` here, since it's
+        // possible that we visit impossible-to-satisfy where clauses here,
+        // see #91745
+        *ty = self.tcx.try_normalize_erasing_regions(self.param_env, *ty).unwrap_or(ty);
     }
 }