From 8000d1d30d0c6205585b12331124745aaf21c340 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 19 Aug 2020 20:02:33 +0200 Subject: 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. --- crates/ide/src/syntax_highlighting.rs | 6 ------ 1 file changed, 6 deletions(-) (limited to 'crates/ide/src/syntax_highlighting.rs') 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 { if func.is_unsafe(db) { h |= HighlightModifier::Unsafe; } - if let Some(self_param) = func.self_param(db) { - match self_param.access(db) { - hir::Access::Exclusive => h |= HighlightModifier::Mutable, - hir::Access::Shared | hir::Access::Owned => (), - } - } return h; } hir::ModuleDef::Adt(hir::Adt::Struct(_)) => HighlightTag::Struct, -- cgit v1.2.3