mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Minor
This commit is contained in:
parent
422ac441c2
commit
0b62b990ba
1 changed files with 1 additions and 2 deletions
|
@ -706,8 +706,7 @@ fn highlight_func_by_name_ref(
|
|||
sema: &Semantics<RootDatabase>,
|
||||
name_ref: &ast::NameRef,
|
||||
) -> Option<Highlight> {
|
||||
let parent = name_ref.syntax().parent()?;
|
||||
let method_call = ast::MethodCallExpr::cast(parent)?;
|
||||
let method_call = name_ref.syntax().parent().and_then(ast::MethodCallExpr::cast)?;
|
||||
highlight_method_call(sema, &method_call)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue