Skip to content

Commit c476f71

Browse files
committed
Highlight only the unsafe operator itself
1 parent 83fd0fb commit c476f71

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

crates/ra_ide/src/syntax_highlighting.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -480,12 +480,8 @@ fn highlight_element(
480480
_ => h,
481481
}
482482
}
483-
PREFIX_EXPR => {
484-
let prefix_expr = element.into_node().and_then(ast::PrefixExpr::cast)?;
485-
match prefix_expr.op_kind() {
486-
Some(ast::PrefixOp::Deref) => {}
487-
_ => return None,
488-
}
483+
T![*] => {
484+
let prefix_expr = element.parent().and_then(ast::PrefixExpr::cast)?;
489485

490486
let expr = prefix_expr.expr()?;
491487
let ty = sema.type_of_expr(&expr)?;

0 commit comments

Comments
 (0)