File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
compiler/rustc_infer/src/traits Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -72,12 +72,27 @@ pub trait TraitEngine<'tcx, E: 'tcx>: 'tcx {
7272 self . register_predicate_obligation ( infcx, obligation) ;
7373 }
7474 }
75-
75+ /// Go over the list of pending obligations and try to evaluate them.
76+ ///
77+ /// For each result:
78+ /// Ok: remove the obligation from the list
79+ /// Ambiguous: leave the obligation in the list to be evaluated later
80+ /// Err: remove the obligation from the list and return an error
81+ ///
82+ /// Returns a list of errors from obligations that evaluated to Err.
7683 #[ must_use]
7784 fn select_where_possible ( & mut self , infcx : & InferCtxt < ' tcx > ) -> Vec < E > ;
7885
7986 fn collect_remaining_errors ( & mut self , infcx : & InferCtxt < ' tcx > ) -> Vec < E > ;
8087
88+ /// Evaluate all pending obligations, return error if they can't be evaluated.
89+ ///
90+ /// For each result:
91+ /// Ok: remove the obligation from the list
92+ /// Ambiguous: remove the obligation from the list and return an error
93+ /// Err: remove the obligation from the list and return an error
94+ ///
95+ /// Returns a list of errors from obligations that evaluated to Ambiguous or Err.
8196 #[ must_use]
8297 fn select_all_or_error ( & mut self , infcx : & InferCtxt < ' tcx > ) -> Vec < E > {
8398 let errors = self . select_where_possible ( infcx) ;
You can’t perform that action at this time.
0 commit comments