about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/solve
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-07 10:32:42 +0000
committerbors <bors@rust-lang.org>2023-07-07 10:32:42 +0000
commit1a449dcfd25143f7e1f6b6f5ddf1c12af361e2ff (patch)
tree142f10c8aa13483fc241b510cbb66b386c9b19f5 /compiler/rustc_trait_selection/src/solve
parent921f669749a57ab5936721fdd93b2da57b581381 (diff)
parent3f8919c09bbf78b6d1d48fbbacbd63ad5a78cf7a (diff)
downloadrust-1a449dcfd25143f7e1f6b6f5ddf1c12af361e2ff.tar.gz
rust-1a449dcfd25143f7e1f6b6f5ddf1c12af361e2ff.zip
Auto merge of #113308 - compiler-errors:poly-select, r=lcnr
Split `SelectionContext::select` into fns that take a binder and don't

*most* usages of `SelectionContext::select` don't need to use a binder, but wrap them in a dummy because of the signature. Let's split this out into `SelectionContext::{select,poly_select}` and limit the usages of the latter.

Right now, we only have 3 places where we're calling `poly_select` -- fulfillment, internally within the old solver, and the auto-trait finder.

r? `@lcnr`
Diffstat (limited to 'compiler/rustc_trait_selection/src/solve')
-rw-r--r--compiler/rustc_trait_selection/src/solve/eval_ctxt/select.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/eval_ctxt/select.rs b/compiler/rustc_trait_selection/src/solve/eval_ctxt/select.rs
index 0800738a3f2..bf6cbef8c3b 100644
--- a/compiler/rustc_trait_selection/src/solve/eval_ctxt/select.rs
+++ b/compiler/rustc_trait_selection/src/solve/eval_ctxt/select.rs
@@ -4,7 +4,7 @@ use rustc_hir::def_id::DefId;
 use rustc_infer::infer::{DefineOpaqueTypes, InferCtxt, InferOk};
 use rustc_infer::traits::util::supertraits;
 use rustc_infer::traits::{
-    Obligation, PredicateObligation, Selection, SelectionResult, TraitObligation,
+    Obligation, PolyTraitObligation, PredicateObligation, Selection, SelectionResult,
 };
 use rustc_middle::traits::solve::{CanonicalInput, Certainty, Goal};
 use rustc_middle::traits::{
@@ -23,14 +23,14 @@ use crate::traits::vtable::{count_own_vtable_entries, prepare_vtable_segments, V
 pub trait InferCtxtSelectExt<'tcx> {
     fn select_in_new_trait_solver(
         &self,
-        obligation: &TraitObligation<'tcx>,
+        obligation: &PolyTraitObligation<'tcx>,
     ) -> SelectionResult<'tcx, Selection<'tcx>>;
 }
 
 impl<'tcx> InferCtxtSelectExt<'tcx> for InferCtxt<'tcx> {
     fn select_in_new_trait_solver(
         &self,
-        obligation: &TraitObligation<'tcx>,
+        obligation: &PolyTraitObligation<'tcx>,
     ) -> SelectionResult<'tcx, Selection<'tcx>> {
         assert!(self.next_trait_solver());