mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Add public function for resolving ast::Expr
to hir::Callable
This commit is contained in:
parent
0ac05c0527
commit
ed3497883c
2 changed files with 12 additions and 0 deletions
|
@ -1120,6 +1120,10 @@ impl<'db> SemanticsImpl<'db> {
|
|||
self.analyze(pat.syntax())?.binding_mode_of_pat(self.db, pat)
|
||||
}
|
||||
|
||||
pub fn resolve_expr_as_callable(&self, call: &ast::Expr) -> Option<Callable> {
|
||||
self.analyze(call.syntax())?.resolve_expr_as_callable(self.db, call)
|
||||
}
|
||||
|
||||
pub fn resolve_method_call(&self, call: &ast::MethodCallExpr) -> Option<Function> {
|
||||
self.analyze(call.syntax())?.resolve_method_call(self.db, call)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue