diff options
author | GrayJack <[email protected]> | 2020-07-20 15:21:40 +0100 |
---|---|---|
committer | GrayJack <[email protected]> | 2020-07-20 15:21:40 +0100 |
commit | 54ebb2ce301813a9b5b48d5abe97ace370cfa617 (patch) | |
tree | b08c7fb1ea6fd15d800ef098df9ddfd0ee5230aa /crates/ra_ide/src | |
parent | 73bab32aef073a101854099d6ef193737cf2a4fe (diff) |
Handle semantic highlight when STAR is part of the `*{const, mut}`
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs index 606637d11..2b1b6a4fd 100644 --- a/crates/ra_ide/src/syntax_highlighting.rs +++ b/crates/ra_ide/src/syntax_highlighting.rs | |||
@@ -543,7 +543,10 @@ fn highlight_element( | |||
543 | T![::] | T![->] | T![=>] | T![&] => HighlightTag::Operator.into(), | 543 | T![::] | T![->] | T![=>] | T![&] => HighlightTag::Operator.into(), |
544 | T![@] => HighlightTag::Operator | HighlightModifier::ControlFlow, | 544 | T![@] => HighlightTag::Operator | HighlightModifier::ControlFlow, |
545 | T![!] if element.parent().and_then(ast::MacroCall::cast).is_some() => { | 545 | T![!] if element.parent().and_then(ast::MacroCall::cast).is_some() => { |
546 | Highlight::new(HighlightTag::Macro) | 546 | HighlightTag::Macro.into() |
547 | } | ||
548 | T![*] if element.parent().and_then(ast::PointerType::cast).is_some() => { | ||
549 | HighlightTag::Keyword.into() | ||
547 | } | 550 | } |
548 | T![*] if element.parent().and_then(ast::PrefixExpr::cast).is_some() => { | 551 | T![*] if element.parent().and_then(ast::PrefixExpr::cast).is_some() => { |
549 | let prefix_expr = element.parent().and_then(ast::PrefixExpr::cast)?; | 552 | let prefix_expr = element.parent().and_then(ast::PrefixExpr::cast)?; |