Deprioritize fulfillment errors that come from expansions.
This commit is contained in:
parent
44a500c8c1
commit
6821adb651
5 changed files with 23 additions and 16 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue