aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/syntax_highlighting.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-08-22 15:41:17 +0100
committerGitHub <[email protected]>2020-08-22 15:41:17 +0100
commite65d48d1fb3d4d91d9dc1148a7a836ff5c9a3c87 (patch)
treeb843cb143848319cbaed5256afa3b591b7b53d85 /crates/ide/src/syntax_highlighting.rs
parentd7466c9f9e7b0565afcaff11e508a84d813d1b46 (diff)
parent8000d1d30d0c6205585b12331124745aaf21c340 (diff)
Merge #5823
5823: Don't underline function definition if self is &mut r=Nashenas88 a=matklad The self is right there, and is already underlined, so it makes little sense to emit even more underlines. before: ![before](https://user-images.githubusercontent.com/1711539/90672843-0d379500-e257-11ea-840f-b0caed4410f1.png) after: ![after](https://user-images.githubusercontent.com/1711539/90672840-0c9efe80-e257-11ea-9739-23af433841c6.png) Co-authored-by: Aleksey Kladov <[email protected]>
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 aefc86949..25d6f7abd 100644
--- a/crates/ide/src/syntax_highlighting.rs
+++ b/crates/ide/src/syntax_highlighting.rs
@@ -748,12 +748,6 @@ fn highlight_def(db: &RootDatabase, def: Definition) -> Highlight {
748 if func.is_unsafe(db) { 748 if func.is_unsafe(db) {
749 h |= HighlightModifier::Unsafe; 749 h |= HighlightModifier::Unsafe;
750 } 750 }
751 if let Some(self_param) = func.self_param(db) {
752 match self_param.access(db) {
753 hir::Access::Exclusive => h |= HighlightModifier::Mutable,
754 hir::Access::Shared | hir::Access::Owned => (),
755 }
756 }
757 return h; 751 return h;
758 } 752 }
759 hir::ModuleDef::Adt(hir::Adt::Struct(_)) => HighlightTag::Struct, 753 hir::ModuleDef::Adt(hir::Adt::Struct(_)) => HighlightTag::Struct,