mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
internal: merge hir::BinaryOp and ast::BinOp
This commit is contained in:
parent
fe4f059450
commit
90357a9090
12 changed files with 160 additions and 233 deletions
|
@ -892,7 +892,7 @@ fn expr_require_exclusive_access(ctx: &AssistContext, expr: &ast::Expr) -> Optio
|
|||
let parent = expr.syntax().parent()?;
|
||||
|
||||
if let Some(bin_expr) = ast::BinExpr::cast(parent.clone()) {
|
||||
if bin_expr.op_kind()?.is_assignment() {
|
||||
if matches!(bin_expr.op_kind()?, ast::BinaryOp::Assignment { .. }) {
|
||||
return Some(bin_expr.lhs()?.syntax() == expr.syntax());
|
||||
}
|
||||
return Some(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue