summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/solve
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2023-06-07 18:01:29 +0530
committerGitHub <noreply@github.com>2023-06-07 18:01:29 +0530
commit0b002eb90692cd30f09b3ed37b2fab55dfc6427a (patch)
tree2860172c3faa6a20d9b870c17c5c8d5bd8254c77 /compiler/rustc_trait_selection/src/solve
parentcbe429c7a5fba9f77d76f214a45c03b67a1328c1 (diff)
parentaabdeedc7c812388b30575a5f53292128f4f7464 (diff)
downloadrust-0b002eb90692cd30f09b3ed37b2fab55dfc6427a.tar.gz
rust-0b002eb90692cd30f09b3ed37b2fab55dfc6427a.zip
Rollup merge of #112122 - compiler-errors:next-coherence, r=lcnr
Add `-Ztrait-solver=next-coherence`

Flag that conditionally uses the trait solver *only* during coherence, for more testing and/or eventual partial-migration onto the trait solver (in the medium- to long-term).

* This still uses the selection context in some of the coherence methods I think, so it's not "complete". Putting this up for review and/or for further work in-tree.
* I probably need to spend a bit more time making sure that we don't sneakily create any other infcx's during coherence that also need the new solver enabled.

r? `@lcnr`
Diffstat (limited to 'compiler/rustc_trait_selection/src/solve')
-rw-r--r--compiler/rustc_trait_selection/src/solve/eval_ctxt.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs b/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs
index bc93b9e99ad..3001d9f1b1f 100644
--- a/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs
+++ b/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs
@@ -187,6 +187,7 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
             let (ref infcx, input, var_values) = tcx
                 .infer_ctxt()
                 .intercrate(intercrate)
+                .with_next_trait_solver(true)
                 .with_opaque_type_inference(canonical_input.value.anchor)
                 .build_with_canonical(DUMMY_SP, &canonical_input);