1
Fork 0

Separate trait selection from ambiguity reporting.

This commit is contained in:
Camille GILLOT 2022-09-28 18:16:23 +02:00
parent 2870ce01b8
commit cb873b2d93
8 changed files with 25 additions and 30 deletions

View file

@ -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 {