diff options
author | Paul Daniel Faria <[email protected]> | 2020-06-27 19:42:42 +0100 |
---|---|---|
committer | Paul Daniel Faria <[email protected]> | 2020-08-10 13:44:54 +0100 |
commit | 38440d53d8329ac9f3f2013c6e32b3f69b069c72 (patch) | |
tree | 9f8bef46fc35c1ad4476e6c91e68c085c39da811 /crates/ra_ide/src/syntax_highlighting.rs | |
parent | c9e670b8754b8262b5071a96c32cbcd22ff968f4 (diff) |
Cleanup repr check, fix packed repr check and test
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting.rs')
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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( | |||
565 | _ => h, | 565 | _ => h, |
566 | } | 566 | } |
567 | } | 567 | } |
568 | T![&] => { | 568 | REF_EXPR => { |
569 | let ref_expr = element.into_node().and_then(ast::RefExpr::cast)?; | 569 | let ref_expr = element.into_node().and_then(ast::RefExpr::cast)?; |
570 | let expr = ref_expr.expr()?; | 570 | let expr = ref_expr.expr()?; |
571 | let field_expr = match expr { | 571 | let field_expr = match expr { |
@@ -582,7 +582,7 @@ fn highlight_element( | |||
582 | // FIXME This needs layout computation to be correct. It will highlight | 582 | // FIXME This needs layout computation to be correct. It will highlight |
583 | // more than it should with the current implementation. | 583 | // more than it should with the current implementation. |
584 | 584 | ||
585 | Highlight::new(HighlightTag::Operator) | HighlightModifier::Unsafe | 585 | HighlightTag::Operator | HighlightModifier::Unsafe |
586 | } | 586 | } |
587 | p if p.is_punct() => match p { | 587 | p if p.is_punct() => match p { |
588 | T![::] | T![->] | T![=>] | T![&] | T![..] | T![=] | T![@] => { | 588 | T![::] | T![->] | T![=>] | T![&] | T![..] | T![=] | T![@] => { |