mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Highlight only the unsafe operator itself
This commit is contained in:
parent
83fd0fb355
commit
c476f71bdf
1 changed files with 2 additions and 6 deletions
|
@ -480,12 +480,8 @@ fn highlight_element(
|
||||||
_ => h,
|
_ => h,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PREFIX_EXPR => {
|
T![*] => {
|
||||||
let prefix_expr = element.into_node().and_then(ast::PrefixExpr::cast)?;
|
let prefix_expr = element.parent().and_then(ast::PrefixExpr::cast)?;
|
||||||
match prefix_expr.op_kind() {
|
|
||||||
Some(ast::PrefixOp::Deref) => {}
|
|
||||||
_ => return None,
|
|
||||||
}
|
|
||||||
|
|
||||||
let expr = prefix_expr.expr()?;
|
let expr = prefix_expr.expr()?;
|
||||||
let ty = sema.type_of_expr(&expr)?;
|
let ty = sema.type_of_expr(&expr)?;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue