Skip to content

Commit 376e5ed

Browse files
committed
use typing mode postanalysis in qualif in the next solver
1 parent 18d118a commit 376e5ed

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • compiler/rustc_const_eval/src/check_consts

compiler/rustc_const_eval/src/check_consts/qualifs.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,11 @@ impl Qualif for HasMutInterior {
105105
// opaque types.
106106
let typing_env = ty::TypingEnv::new(
107107
cx.typing_env.param_env,
108-
ty::TypingMode::analysis_in_body(cx.tcx, cx.body.source.def_id().expect_local()),
108+
if cx.tcx.next_trait_solver_globally() {
109+
ty::TypingMode::PostAnalysis
110+
} else {
111+
ty::TypingMode::analysis_in_body(cx.tcx, cx.body.source.def_id().expect_local())
112+
},
109113
);
110114
let (infcx, param_env) = cx.tcx.infer_ctxt().build_with_typing_env(typing_env);
111115
let ocx = ObligationCtxt::new(&infcx);

0 commit comments

Comments
 (0)