1
Fork 0

Rollup merge of #106820 - m-ou-se:macro-type-error-thing, r=estebank

Deprioritize fulfillment errors that come from expansions.

Fixes (part of?) #69455
This commit is contained in:
Matthias Krüger 2023-01-14 18:45:27 +01:00 committed by GitHub
commit f04f97cea4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 16 deletions

View file

@ -454,9 +454,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);
}
}
}