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, 2 insertions, 2 deletions
diff --git a/crates/hir_ty/src/infer/coerce.rs b/crates/hir_ty/src/infer/coerce.rs index cd5fb3252..4cca35904 100644 --- a/crates/hir_ty/src/infer/coerce.rs +++ b/crates/hir_ty/src/infer/coerce.rs | |||
@@ -89,14 +89,14 @@ impl<'a> InferenceContext<'a> { | |||
89 | | (Ty::Ref(Mutability::Shared, ..), Ty::Ref(Mutability::Mut, ..)) => return false, | 89 | | (Ty::Ref(Mutability::Shared, ..), Ty::Ref(Mutability::Mut, ..)) => return false, |
90 | 90 | ||
91 | // `{function_type}` -> `fn()` | 91 | // `{function_type}` -> `fn()` |
92 | (Ty::FnDef(..), Ty::FnPtr { .. }) => match from_ty.callable_sig(self.db) { | 92 | (Ty::FnDef(..), Ty::Function { .. }) => match from_ty.callable_sig(self.db) { |
93 | None => return false, | 93 | None => return false, |
94 | Some(sig) => { | 94 | Some(sig) => { |
95 | from_ty = Ty::fn_ptr(sig); | 95 | from_ty = Ty::fn_ptr(sig); |
96 | } | 96 | } |
97 | }, | 97 | }, |
98 | 98 | ||
99 | (Ty::Closure { substs, .. }, Ty::FnPtr { .. }) => { | 99 | (Ty::Closure(.., substs), Ty::Function { .. }) => { |
100 | from_ty = substs[0].clone(); | 100 | from_ty = substs[0].clone(); |
101 | } | 101 | } |
102 | 102 | ||