aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/syntax_highlighting.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-06-08 14:23:38 +0100
committerGitHub <[email protected]>2020-06-08 14:23:38 +0100
commit5ed9818a7c855bf914e91324e305f24e4e743057 (patch)
tree815afbf6c0b7fa223a58f858212d9ae4ea9d073d /crates/ra_ide/src/syntax_highlighting.rs
parent83fd0fb35573985a5f6d055ce87888fac8ca3535 (diff)
parent3b4d000250ae142288408cfe2abe7c10d4495c92 (diff)
Merge #4796
4796: Fix unsafe highlihgintngs r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting.rs')
-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)?;