Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/mir/lower.rs')
-rw-r--r--crates/hir-ty/src/mir/lower.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/hir-ty/src/mir/lower.rs b/crates/hir-ty/src/mir/lower.rs
index f7119c303a..3402b761d3 100644
--- a/crates/hir-ty/src/mir/lower.rs
+++ b/crates/hir-ty/src/mir/lower.rs
@@ -2160,9 +2160,7 @@ pub fn lower_to_mir(
root_expr: ExprId,
) -> Result<MirBody> {
if infer.has_errors {
- return Err(MirLowerError::TypeMismatch(
- infer.type_mismatches().next().map(|(_, it)| it.clone()),
- ));
+ return Err(MirLowerError::TypeMismatch(None));
}
let mut ctx = MirLowerCtx::new(db, owner, body, infer);
// 0 is return local