diff options
author | Florian Diebold <[email protected]> | 2021-03-13 16:55:50 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-03-13 16:56:48 +0000 |
commit | 9719ce9fc731a400c9744ba1a6569e978c1a97e7 (patch) | |
tree | a9c674c83723e2ed145793f72450c873da62a6fc /crates/hir | |
parent | 19664e276aba21a42cad5351a2c91995d1ce5d52 (diff) |
Use chalk_ir::FnDefId
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 }) |