about summary refs log tree commit diff
diff options
context:
space:
mode:
authorIQuant <quant3234@gmail.com>2023-04-04 19:18:34 +0300
committerIQuant <quant3234@gmail.com>2023-04-04 19:18:34 +0300
commit3fb6d6b2f422943cea592f64e4ae8984d6b86f1f (patch)
treeec91dca9b9bfd03591c41fce8ec1e28ae6efbbdf
parent467d367df75121dd305626ea2fb4459af588d29c (diff)
downloadrust-3fb6d6b2f422943cea592f64e4ae8984d6b86f1f.tar.gz
rust-3fb6d6b2f422943cea592f64e4ae8984d6b86f1f.zip
Now passes tests
-rw-r--r--compiler/rustc_infer/src/infer/error_reporting/mod.rs3
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