Keep the span for Attr::Literal

This commit is contained in:
Lukas Wirth 2024-03-21 10:28:25 +01:00
parent 6d1071962f
commit 928d847cc2
7 changed files with 44 additions and 36 deletions

View file

@ -540,7 +540,7 @@ impl CompletionContext<'_> {
/// Whether the given trait is an operator trait or not.
pub(crate) fn is_ops_trait(&self, trait_: hir::Trait) -> bool {
match trait_.attrs(self.db).lang() {
Some(lang) => OP_TRAIT_LANG_NAMES.contains(&lang.as_str()),
Some(lang) => OP_TRAIT_LANG_NAMES.contains(&lang),
None => false,
}
}