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

@ -226,7 +226,7 @@ fn signature_help_for_call(
let mut buf = String::new();
for (idx, p) in callable.params().into_iter().enumerate() {
buf.clear();
if let Some(param) = p.source(sema.db) {
if let Some(param) = sema.source(p.clone()) {
match param.value {
Either::Right(param) => match param.pat() {
Some(pat) => format_to!(buf, "{}: ", pat),