functions resolve to impl

This commit is contained in:
bitgaoshu 2022-06-24 19:11:35 +08:00
parent 36fadc4224
commit 6ecabe352a
4 changed files with 50 additions and 102 deletions

View file

@ -348,9 +348,6 @@ 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)
}
@ -981,10 +978,6 @@ 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)?;