]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_typeck/src/check/mod.rs
Auto merge of #88266 - nikomatsakis:issue-87879, r=jackh726
[rust.git] / compiler / rustc_typeck / src / check / mod.rs
index 2a196644dac9dd3be052cbca4bc0d0f59e471073..a88b1c7af5a96640f49b498fd536d0524ea57834 100644 (file)
@@ -446,11 +446,12 @@ fn typeck_with_fallback<'tcx>(
             fcx
         };
 
-        fcx.type_inference_fallback();
+        let fallback_has_occurred = fcx.type_inference_fallback();
 
         // Even though coercion casts provide type hints, we check casts after fallback for
         // backwards compatibility. This makes fallback a stronger type hint than a cast coercion.
         fcx.check_casts();
+        fcx.select_obligations_where_possible(fallback_has_occurred, |_| {});
 
         // Closure and generator analysis may run after fallback
         // because they don't constrain other type variables.