|
1 |
| -use crate::solve::NextSolverError; |
2 | 1 | use crate::traits::query::evaluate_obligation::InferCtxtExt as _;
|
3 |
| -use crate::traits::{ |
4 |
| - self, FromSolverError, Obligation, ObligationCause, ObligationCtxt, OldSolverError, |
5 |
| - SelectionContext, |
6 |
| -}; |
| 2 | +use crate::traits::{self, Obligation, ObligationCause, ObligationCtxt, SelectionContext}; |
7 | 3 |
|
8 | 4 | use rustc_hir::def_id::DefId;
|
9 | 5 | use rustc_hir::lang_items::LangItem;
|
@@ -124,21 +120,19 @@ impl<'tcx> InferCtxtBuilder<'tcx> {
|
124 | 120 | /// bound for the closure and in part because it is convenient to
|
125 | 121 | /// have `'tcx` be free on this function so that we can talk about
|
126 | 122 | /// `K: TypeFoldable<TyCtxt<'tcx>>`.)
|
127 |
| - fn enter_canonical_trait_query<K, R, E>( |
| 123 | + fn enter_canonical_trait_query<K, R>( |
128 | 124 | self,
|
129 | 125 | canonical_key: &Canonical<'tcx, K>,
|
130 |
| - operation: impl FnOnce(&ObligationCtxt<'_, 'tcx, E>, K) -> Result<R, NoSolution>, |
| 126 | + operation: impl FnOnce(&ObligationCtxt<'_, 'tcx>, K) -> Result<R, NoSolution>, |
131 | 127 | ) -> Result<CanonicalQueryResponse<'tcx, R>, NoSolution>
|
132 | 128 | where
|
133 | 129 | K: TypeFoldable<TyCtxt<'tcx>>,
|
134 | 130 | R: Debug + TypeFoldable<TyCtxt<'tcx>>,
|
135 | 131 | Canonical<'tcx, QueryResponse<'tcx, R>>: ArenaAllocatable<'tcx>,
|
136 |
| - E: FromSolverError<'tcx, NextSolverError<'tcx>> |
137 |
| - + FromSolverError<'tcx, OldSolverError<'tcx>>, |
138 | 132 | {
|
139 | 133 | let (infcx, key, canonical_inference_vars) =
|
140 | 134 | self.build_with_canonical(DUMMY_SP, canonical_key);
|
141 |
| - let ocx = ObligationCtxt::new_generic(&infcx); |
| 135 | + let ocx = ObligationCtxt::new(&infcx); |
142 | 136 | let value = operation(&ocx, key)?;
|
143 | 137 | ocx.make_canonicalized_query_response(canonical_inference_vars, value)
|
144 | 138 | }
|
|
0 commit comments