diff options
Diffstat (limited to 'crates/hir')
-rw-r--r-- | crates/hir/src/lib.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index f15fb1a82..7f8f936d3 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs | |||
@@ -1715,10 +1715,7 @@ impl Type { | |||
1715 | } | 1715 | } |
1716 | 1716 | ||
1717 | pub fn as_callable(&self, db: &dyn HirDatabase) -> Option<Callable> { | 1717 | pub fn as_callable(&self, db: &dyn HirDatabase) -> Option<Callable> { |
1718 | let def = match self.ty.value.interned(&Interner) { | 1718 | let def = self.ty.value.callable_def(db); |
1719 | &TyKind::FnDef(def, _) => Some(def), | ||
1720 | _ => None, | ||
1721 | }; | ||
1722 | 1719 | ||
1723 | let sig = self.ty.value.callable_sig(db)?; | 1720 | let sig = self.ty.value.callable_sig(db)?; |
1724 | Some(Callable { ty: self.clone(), sig, def, is_bound_method: false }) | 1721 | Some(Callable { ty: self.clone(), sig, def, is_bound_method: false }) |