mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
goto where trait method impl
This commit is contained in:
parent
6fc5c3cd21
commit
1ef5e14c2c
5 changed files with 366 additions and 117 deletions
|
@ -348,6 +348,9 @@ impl<'db, DB: HirDatabase> Semantics<'db, DB> {
|
|||
self.imp.resolve_method_call(call).map(Function::from)
|
||||
}
|
||||
|
||||
pub fn resolve_impl_method(&self, call: &ast::Expr) -> Option<Function> {
|
||||
self.imp.resolve_impl_method(call).map(Function::from)
|
||||
}
|
||||
pub fn resolve_method_call_as_callable(&self, call: &ast::MethodCallExpr) -> Option<Callable> {
|
||||
self.imp.resolve_method_call_as_callable(call)
|
||||
}
|
||||
|
@ -978,6 +981,10 @@ impl<'db> SemanticsImpl<'db> {
|
|||
self.analyze(call.syntax())?.resolve_method_call(self.db, call).map(|(id, _)| id)
|
||||
}
|
||||
|
||||
fn resolve_impl_method(&self, call: &ast::Expr) -> Option<FunctionId> {
|
||||
self.analyze(call.syntax())?.resolve_impl_method(self.db, call)
|
||||
}
|
||||
|
||||
fn resolve_method_call_as_callable(&self, call: &ast::MethodCallExpr) -> Option<Callable> {
|
||||
let source_analyzer = self.analyze(call.syntax())?;
|
||||
let (func, subst) = source_analyzer.resolve_method_call(self.db, call)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue