diff options
| author | lcnr <rust@lcnr.de> | 2023-03-21 16:34:04 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2023-03-21 16:34:04 +0100 |
| commit | 938434ab82609c8de83028fa80bde4d6d28c282a (patch) | |
| tree | a55793a70afa69f1b163ef6bb443dcc3c68152c5 /compiler/rustc_trait_selection/src/solve | |
| parent | 47f24a881bb05293c4d922218d9dfed7e29511cd (diff) | |
| download | rust-938434ab82609c8de83028fa80bde4d6d28c282a.tar.gz rust-938434ab82609c8de83028fa80bde4d6d28c282a.zip | |
enable `intercrate` in the solver `InferCtxt`
Diffstat (limited to 'compiler/rustc_trait_selection/src/solve')
| -rw-r--r-- | compiler/rustc_trait_selection/src/solve/eval_ctxt.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs b/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs index 4b85be69e61..c492c8c0aea 100644 --- a/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs +++ b/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs @@ -127,8 +127,14 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> { // // The actual solver logic happens in `ecx.compute_goal`. search_graph.with_new_goal(tcx, canonical_goal, |search_graph| { - let (ref infcx, goal, var_values) = - tcx.infer_ctxt().build_with_canonical(DUMMY_SP, &canonical_goal); + let intercrate = match search_graph.solver_mode() { + SolverMode::Normal => false, + SolverMode::Coherence => true, + }; + let (ref infcx, goal, var_values) = tcx + .infer_ctxt() + .intercrate(intercrate) + .build_with_canonical(DUMMY_SP, &canonical_goal); let mut ecx = EvalCtxt { infcx, var_values, |
