From 38440d53d8329ac9f3f2013c6e32b3f69b069c72 Mon Sep 17 00:00:00 2001 From: Paul Daniel Faria Date: Sat, 27 Jun 2020 14:42:42 -0400 Subject: Cleanup repr check, fix packed repr check and test --- crates/ra_ide/src/syntax_highlighting.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide/src/syntax_highlighting.rs') diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs index 9e8419c5f..a4a7aa228 100644 --- a/crates/ra_ide/src/syntax_highlighting.rs +++ b/crates/ra_ide/src/syntax_highlighting.rs @@ -565,7 +565,7 @@ fn highlight_element( _ => h, } } - T![&] => { + REF_EXPR => { let ref_expr = element.into_node().and_then(ast::RefExpr::cast)?; let expr = ref_expr.expr()?; let field_expr = match expr { @@ -582,7 +582,7 @@ fn highlight_element( // FIXME This needs layout computation to be correct. It will highlight // more than it should with the current implementation. - Highlight::new(HighlightTag::Operator) | HighlightModifier::Unsafe + HighlightTag::Operator | HighlightModifier::Unsafe } p if p.is_punct() => match p { T![::] | T![->] | T![=>] | T![&] | T![..] | T![=] | T![@] => { -- cgit v1.2.3