@@ -141,17 +141,6 @@ type CanonicalResponse<'tcx> = Canonical<'tcx, Response<'tcx>>;
141
141
/// solver, merge the two responses again.
142
142
pub type QueryResult < ' tcx > = Result < CanonicalResponse < ' tcx > , NoSolution > ;
143
143
144
- pub trait TyCtxtExt < ' tcx > {
145
- fn evaluate_goal ( self , goal : CanonicalGoal < ' tcx > ) -> QueryResult < ' tcx > ;
146
- }
147
-
148
- impl < ' tcx > TyCtxtExt < ' tcx > for TyCtxt < ' tcx > {
149
- fn evaluate_goal ( self , goal : CanonicalGoal < ' tcx > ) -> QueryResult < ' tcx > {
150
- let mut search_graph = search_graph:: SearchGraph :: new ( self ) ;
151
- EvalCtxt :: evaluate_canonical_goal ( self , & mut search_graph, goal)
152
- }
153
- }
154
-
155
144
pub trait InferCtxtEvalExt < ' tcx > {
156
145
/// Evaluates a goal from **outside** of the trait solver.
157
146
///
@@ -194,6 +183,15 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
194
183
self . infcx . tcx
195
184
}
196
185
186
+ /// The entry point of the solver.
187
+ ///
188
+ /// This function deals with (coinductive) cycles, overflow, and caching
189
+ /// and then calls [`EvalCtxt::compute_goal`] which contains the actual
190
+ /// logic of the solver.
191
+ ///
192
+ /// Instead of calling this function directly, use either [EvalCtxt::evaluate_goal]
193
+ /// if you're inside of the solver or [InferCtxtEvalExt::evaluate_root_goal] if you're
194
+ /// outside of it.
197
195
#[ instrument( level = "debug" , skip( tcx, search_graph) , ret) ]
198
196
fn evaluate_canonical_goal (
199
197
tcx : TyCtxt < ' tcx > ,
0 commit comments