diff options
author | Aleksey Kladov <[email protected]> | 2020-08-19 19:02:33 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-08-19 19:02:33 +0100 |
commit | 8000d1d30d0c6205585b12331124745aaf21c340 (patch) | |
tree | a244ae18e6ba2afa9feda2e9990faf53f01bf167 /crates/ide/src | |
parent | eb7bb2cba0b846b32aaf33bc187465f349706431 (diff) |
Don't underline function definition if self is &mut
The self is right there, and is already underlined, so it makes little
sense to emit even more underlines.
Diffstat (limited to 'crates/ide/src')
-rw-r--r-- | crates/ide/src/syntax_highlighting.rs | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/crates/ide/src/syntax_highlighting.rs b/crates/ide/src/syntax_highlighting.rs index dd8cfe42d..be88b2f9c 100644 --- a/crates/ide/src/syntax_highlighting.rs +++ b/crates/ide/src/syntax_highlighting.rs | |||
@@ -747,12 +747,6 @@ fn highlight_def(db: &RootDatabase, def: Definition) -> Highlight { | |||
747 | if func.is_unsafe(db) { | 747 | if func.is_unsafe(db) { |
748 | h |= HighlightModifier::Unsafe; | 748 | h |= HighlightModifier::Unsafe; |
749 | } | 749 | } |
750 | if let Some(self_param) = func.self_param(db) { | ||
751 | match self_param.access(db) { | ||
752 | hir::Access::Exclusive => h |= HighlightModifier::Mutable, | ||
753 | hir::Access::Shared | hir::Access::Owned => (), | ||
754 | } | ||
755 | } | ||
756 | return h; | 750 | return h; |
757 | } | 751 | } |
758 | hir::ModuleDef::Adt(hir::Adt::Struct(_)) => HighlightTag::Struct, | 752 | hir::ModuleDef::Adt(hir::Adt::Struct(_)) => HighlightTag::Struct, |