From 2b200f6e1a600e263f314efba5d8c3743095071b Mon Sep 17 00:00:00 2001 From: Pascal Hertleif Date: Sat, 25 May 2019 16:29:39 +0200 Subject: Disable broken struct field rainbowing --- crates/ra_ide_api/src/syntax_highlighting.rs | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'crates/ra_ide_api/src/syntax_highlighting.rs') diff --git a/crates/ra_ide_api/src/syntax_highlighting.rs b/crates/ra_ide_api/src/syntax_highlighting.rs index 8981c85e6..e46686ab9 100644 --- a/crates/ra_ide_api/src/syntax_highlighting.rs +++ b/crates/ra_ide_api/src/syntax_highlighting.rs @@ -68,16 +68,7 @@ pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Vec "function", Some(Macro(_)) => "macro", - Some(FieldAccess(field)) => { - let (hir_file_id, src) = field.source(db); - if let hir::FieldSource::Named(name) = src { - let text = name.syntax().text().to_smol_string(); - let shadow_count = 0; // potentially even from different file - binding_hash = Some(calc_binding_hash(hir_file_id.original_file(db), &text, shadow_count)); - } - - "field" - }, + Some(FieldAccess(_)) => "field", Some(AssocItem(ImplItem::Method(_))) => "function", Some(AssocItem(ImplItem::Const(_))) => "constant", Some(AssocItem(ImplItem::TypeAlias(_))) => "type", @@ -119,13 +110,6 @@ pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Vec