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:
@@ -218,7 +218,7 @@ impl<'a, 'tcx> ObligationCtxt<'a, 'tcx> {
|
||||
def_id: LocalDefId,
|
||||
) -> Result<FxIndexSet<Ty<'tcx>>, ErrorGuaranteed> {
|
||||
self.assumed_wf_types(param_env, def_id)
|
||||
.map_err(|errors| self.infcx.err_ctxt().report_fulfillment_errors(&errors))
|
||||
.map_err(|errors| self.infcx.err_ctxt().report_fulfillment_errors(errors))
|
||||
}
|
||||
|
||||
pub fn assumed_wf_types(
|
||||
|
||||
Reference in New Issue
Block a user