diff options
| author | Michael Goulet <michael@errs.io> | 2024-10-15 15:24:22 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-10-24 02:48:28 +0000 |
| commit | 4217b8702dcd4e45ea506dd0fc8e1cec6115d52a (patch) | |
| tree | 7d3e6cefc11909984e04928368e4d57af726f853 /compiler/rustc_trait_selection | |
| parent | 1920c66a8d96978e0d0e5db318fa3e0fb2e0f37e (diff) | |
| download | rust-4217b8702dcd4e45ea506dd0fc8e1cec6115d52a.tar.gz rust-4217b8702dcd4e45ea506dd0fc8e1cec6115d52a.zip | |
Deeply normalize type trace in type error reporting
Diffstat (limited to 'compiler/rustc_trait_selection')
| -rw-r--r-- | compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs index fd991100879..b9a569d25e3 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs @@ -1252,8 +1252,11 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { } let (expected_found, exp_found, is_simple_error, values) = match values { None => (None, Mismatch::Fixed("type"), false, None), - Some(ty::ParamEnvAnd { param_env: _, value: values }) => { + Some(ty::ParamEnvAnd { param_env, value: values }) => { let mut values = self.resolve_vars_if_possible(values); + if self.next_trait_solver() { + values = deeply_normalize_for_diagnostics(self, param_env, values); + } let (is_simple_error, exp_found) = match values { ValuePairs::Terms(ExpectedFound { expected, found }) => { match (expected.unpack(), found.unpack()) { |
