mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
Keep the span for Attr::Literal
This commit is contained in:
parent
6d1071962f
commit
928d847cc2
7 changed files with 44 additions and 36 deletions
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue