Separate trait selection from ambiguity reporting.
This commit is contained in:
@@ -40,12 +40,7 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentCtxt<'tcx> {
|
||||
self.obligations.push(obligation);
|
||||
}
|
||||
|
||||
fn select_all_or_error(&mut self, infcx: &InferCtxt<'tcx>) -> Vec<FulfillmentError<'tcx>> {
|
||||
let errors = self.select_where_possible(infcx);
|
||||
if !errors.is_empty() {
|
||||
return errors;
|
||||
}
|
||||
|
||||
fn collect_remaining_errors(&mut self) -> Vec<FulfillmentError<'tcx>> {
|
||||
self.obligations
|
||||
.drain(..)
|
||||
.map(|obligation| FulfillmentError {
|
||||
|
||||
Reference in New Issue
Block a user