diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2023-01-13 01:27:58 +0100 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2023-01-14 14:05:26 +0100 |
| commit | 6821adb65145463ffe51e044cbe37ea823059222 (patch) | |
| tree | 61c71a66a3d3a67453f9a7706857b0e7044a39ce /compiler/rustc_trait_selection | |
| parent | 44a500c8c187b245638684748f54bd6ec67e0b25 (diff) | |
Deprioritize fulfillment errors that come from expansions.
Diffstat (limited to 'compiler/rustc_trait_selection')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs index 0c7ffb056cc..c75842d18c6 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs @@ -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); + } } } |
