@@ -141,17 +141,6 @@ type CanonicalResponse<'tcx> = Canonical<'tcx, Response<'tcx>>;
141141/// solver, merge the two responses again.
142142pub type QueryResult < ' tcx > = Result < CanonicalResponse < ' tcx > , NoSolution > ;
143143
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-
155144pub trait InferCtxtEvalExt < ' tcx > {
156145 /// Evaluates a goal from **outside** of the trait solver.
157146 ///
@@ -194,6 +183,15 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
194183 self . infcx . tcx
195184 }
196185
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.
197195 #[ instrument( level = "debug" , skip( tcx, search_graph) , ret) ]
198196 fn evaluate_canonical_goal (
199197 tcx : TyCtxt < ' tcx > ,
0 commit comments