aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/syntax_highlighting.rs
diff options
context:
space:
mode:
authorGrayJack <[email protected]>2020-07-20 15:21:40 +0100
committerGrayJack <[email protected]>2020-07-20 15:21:40 +0100
commit54ebb2ce301813a9b5b48d5abe97ace370cfa617 (patch)
treeb08c7fb1ea6fd15d800ef098df9ddfd0ee5230aa /crates/ra_ide/src/syntax_highlighting.rs
parent73bab32aef073a101854099d6ef193737cf2a4fe (diff)
Handle semantic highlight when STAR is part of the `*{const, mut}`
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting.rs')
-rw-r--r--crates/ra_ide/src/syntax_highlighting.rs5
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)?;