diff options
Diffstat (limited to 'crates/hir_ty/src/infer/coerce.rs')
-rw-r--r-- | crates/hir_ty/src/infer/coerce.rs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/crates/hir_ty/src/infer/coerce.rs b/crates/hir_ty/src/infer/coerce.rs index 20c512517..03dd6ae76 100644 --- a/crates/hir_ty/src/infer/coerce.rs +++ b/crates/hir_ty/src/infer/coerce.rs | |||
@@ -21,10 +21,6 @@ impl<'a> InferenceContext<'a> { | |||
21 | pub(super) fn coerce(&mut self, from_ty: &Ty, to_ty: &Ty) -> bool { | 21 | pub(super) fn coerce(&mut self, from_ty: &Ty, to_ty: &Ty) -> bool { |
22 | let from_ty = self.resolve_ty_shallow(from_ty); | 22 | let from_ty = self.resolve_ty_shallow(from_ty); |
23 | let to_ty = self.resolve_ty_shallow(to_ty); | 23 | let to_ty = self.resolve_ty_shallow(to_ty); |
24 | // TODO handle expectations properly | ||
25 | if to_ty.is_unknown() { | ||
26 | return true; | ||
27 | } | ||
28 | match self.coerce_inner(from_ty, &to_ty) { | 24 | match self.coerce_inner(from_ty, &to_ty) { |
29 | Ok(result) => { | 25 | Ok(result) => { |
30 | self.table.register_infer_ok(result); | 26 | self.table.register_infer_ok(result); |