Thread more HasSource::source calls through Semantics for caching

This commit is contained in:
Lukas Wirth 2024-06-10 10:33:07 +02:00
parent 72dfbe95de
commit 8520a0c585
10 changed files with 121 additions and 84 deletions

View file

@ -575,7 +575,7 @@ impl<'db, 'sema> Matcher<'db, 'sema> {
.resolve_method_call_as_callable(code)
.and_then(|callable| {
let (self_param, _) = callable.receiver_param(self.sema.db)?;
Some(self_param.source(self.sema.db)?.value.kind())
Some(self.sema.source(self_param)?.value.kind())
})
.unwrap_or(ast::SelfParamKind::Owned);
}