1
Fork 0

Deprioritize fulfillment errors that come from expansions.

This commit is contained in:
Mara Bos 2023-01-13 01:27:58 +01:00
parent 44a500c8c1
commit 6821adb651
5 changed files with 23 additions and 16 deletions

View file

@ -453,9 +453,11 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
}
}
for (error, suppressed) in iter::zip(errors, is_suppressed) {
if !suppressed {
self.report_fulfillment_error(error, body_id);
for from_expansion in [false, true] {
for (error, suppressed) in iter::zip(errors, &is_suppressed) {
if !suppressed && error.obligation.cause.span.from_expansion() == from_expansion {
self.report_fulfillment_error(error, body_id);
}
}
}