diff options
| -rw-r--r-- | compiler/rustc_infer/src/infer/error_reporting/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_infer/src/infer/error_reporting/mod.rs b/compiler/rustc_infer/src/infer/error_reporting/mod.rs index ca4f1c20b89..34dfcea81d1 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/mod.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/mod.rs @@ -1928,7 +1928,8 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> { use crate::traits::ObligationCauseCode::MatchExpressionArm; let mut suggestions = Vec::new(); let span = trace.cause.span(); - if let Some((expected, found)) = trace.values.ty() { + let values = self.resolve_vars_if_possible(trace.values); + if let Some((expected, found)) = values.ty() { match (expected.kind(), found.kind()) { (ty::Tuple(_), ty::Tuple(_)) => {} // If a tuple of length one was expected and the found expression has |
