Deduplicate some code

This commit is contained in:
Lukas Wirth 2024-02-10 01:48:41 +01:00
parent bb0de88f24
commit 2ebf0c87c2
22 changed files with 299 additions and 234 deletions

View file

@ -559,7 +559,7 @@ fn highlight_method_call(
}
if func
.as_assoc_item(sema.db)
.and_then(|it| it.containing_trait_or_trait_impl(sema.db))
.and_then(|it| it.container_or_implemented_trait(sema.db))
.is_some()
{
h |= HlMod::Trait;