aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/syntax_highlighting.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-08-19 19:02:33 +0100
committerAleksey Kladov <[email protected]>2020-08-19 19:02:33 +0100
commit8000d1d30d0c6205585b12331124745aaf21c340 (patch)
treea244ae18e6ba2afa9feda2e9990faf53f01bf167 /crates/ide/src/syntax_highlighting.rs
parenteb7bb2cba0b846b32aaf33bc187465f349706431 (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/syntax_highlighting.rs')
-rw-r--r--crates/ide/src/syntax_highlighting.rs6
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,