mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Use chalk_ir::FnDefId
This commit is contained in:
parent
19664e276a
commit
9719ce9fc7
10 changed files with 48 additions and 30 deletions
|
@ -1715,10 +1715,7 @@ impl Type {
|
|||
}
|
||||
|
||||
pub fn as_callable(&self, db: &dyn HirDatabase) -> Option<Callable> {
|
||||
let def = match self.ty.value.interned(&Interner) {
|
||||
&TyKind::FnDef(def, _) => Some(def),
|
||||
_ => None,
|
||||
};
|
||||
let def = self.ty.value.callable_def(db);
|
||||
|
||||
let sig = self.ty.value.callable_sig(db)?;
|
||||
Some(Callable { ty: self.clone(), sig, def, is_bound_method: false })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue