Reorder fullfillment errors to keep more interesting ones first
In `report_fullfillment_errors` push back `T: Sized`, `T: WellFormed` and coercion errors to the end of the list. The pre-existing deduplication logic eliminates redundant errors better that way, keeping the resulting output with fewer errors than before, while also having more detail.
This commit is contained in:
parent
2817ece19c
commit
91b9ffeab0
76 changed files with 337 additions and 431 deletions
|
@ -261,7 +261,7 @@ fn visit_implementation_of_dispatch_from_dyn(tcx: TyCtxt<'_>, impl_did: LocalDef
|
|||
}
|
||||
let errors = ocx.select_all_or_error();
|
||||
if !errors.is_empty() {
|
||||
infcx.err_ctxt().report_fulfillment_errors(&errors);
|
||||
infcx.err_ctxt().report_fulfillment_errors(errors);
|
||||
}
|
||||
|
||||
// Finally, resolve all regions.
|
||||
|
@ -470,7 +470,7 @@ pub fn coerce_unsized_info<'tcx>(tcx: TyCtxt<'tcx>, impl_did: LocalDefId) -> Coe
|
|||
ocx.register_obligation(obligation);
|
||||
let errors = ocx.select_all_or_error();
|
||||
if !errors.is_empty() {
|
||||
infcx.err_ctxt().report_fulfillment_errors(&errors);
|
||||
infcx.err_ctxt().report_fulfillment_errors(errors);
|
||||
}
|
||||
|
||||
// Finally, resolve all regions.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue