File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
compiler/rustc_mir_transform/src Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -34,11 +34,23 @@ impl<'tcx> MutVisitor<'tcx> for RevealAllVisitor<'tcx> {
3434 self . tcx
3535 }
3636
37+ #[ inline]
38+ fn visit_constant ( & mut self , constant : & mut Constant < ' tcx > , _: Location ) {
39+ // We have to use `try_normalize_erasing_regions` here, since it's
40+ // possible that we visit impossible-to-satisfy where clauses here,
41+ // see #91745
42+ if let Ok ( c) = self . tcx . try_normalize_erasing_regions ( self . param_env , constant. literal ) {
43+ constant. literal = c;
44+ }
45+ }
46+
3747 #[ inline]
3848 fn visit_ty ( & mut self , ty : & mut Ty < ' tcx > , _: TyContext ) {
3949 // We have to use `try_normalize_erasing_regions` here, since it's
4050 // possible that we visit impossible-to-satisfy where clauses here,
4151 // see #91745
42- * ty = self . tcx . try_normalize_erasing_regions ( self . param_env , * ty) . unwrap_or ( * ty) ;
52+ if let Ok ( t) = self . tcx . try_normalize_erasing_regions ( self . param_env , * ty) {
53+ * ty = t;
54+ }
4355 }
4456}
You can’t perform that action at this time.
0 commit comments