aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-06-08 14:03:14 +0100
committerAleksey Kladov <[email protected]>2020-06-08 14:03:14 +0100
commitc476f71bdf83e930ebe5c2ad2754f24ee0925c32 (patch)
treed5fdad416d0fd67477fbc857267487bc6111e7a3 /crates
parent83fd0fb35573985a5f6d055ce87888fac8ca3535 (diff)
Highlight only the unsafe operator itself
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_ide/src/syntax_highlighting.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs
index 9ff7356c9..ab45c364a 100644
--- a/crates/ra_ide/src/syntax_highlighting.rs
+++ b/crates/ra_ide/src/syntax_highlighting.rs
@@ -480,12 +480,8 @@ fn highlight_element(
480 _ => h, 480 _ => h,
481 } 481 }
482 } 482 }
483 PREFIX_EXPR => { 483 T![*] => {
484 let prefix_expr = element.into_node().and_then(ast::PrefixExpr::cast)?; 484 let prefix_expr = element.parent().and_then(ast::PrefixExpr::cast)?;
485 match prefix_expr.op_kind() {
486 Some(ast::PrefixOp::Deref) => {}
487 _ => return None,
488 }
489 485
490 let expr = prefix_expr.expr()?; 486 let expr = prefix_expr.expr()?;
491 let ty = sema.type_of_expr(&expr)?; 487 let ty = sema.type_of_expr(&expr)?;