diff options
Diffstat (limited to 'crates/ra_hir_ty/src/infer/coerce.rs')
-rw-r--r-- | crates/ra_hir_ty/src/infer/coerce.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/ra_hir_ty/src/infer/coerce.rs b/crates/ra_hir_ty/src/infer/coerce.rs index 2ee9adb16..32c7c57cd 100644 --- a/crates/ra_hir_ty/src/infer/coerce.rs +++ b/crates/ra_hir_ty/src/infer/coerce.rs | |||
@@ -45,9 +45,7 @@ impl<'a> InferenceContext<'a> { | |||
45 | self.coerce_merge_branch(&ptr_ty1, &ptr_ty2) | 45 | self.coerce_merge_branch(&ptr_ty1, &ptr_ty2) |
46 | } else { | 46 | } else { |
47 | mark::hit!(coerce_merge_fail_fallback); | 47 | mark::hit!(coerce_merge_fail_fallback); |
48 | // For incompatible types, we use the latter one as result | 48 | ty1.clone() |
49 | // to be better recovery for `if` without `else`. | ||
50 | ty2.clone() | ||
51 | } | 49 | } |
52 | } | 50 | } |
53 | } | 51 | } |