mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +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>,
|
sema: &Semantics<RootDatabase>,
|
||||||
name_ref: &ast::NameRef,
|
name_ref: &ast::NameRef,
|
||||||
) -> Option<Highlight> {
|
) -> Option<Highlight> {
|
||||||
let parent = name_ref.syntax().parent()?;
|
let method_call = name_ref.syntax().parent().and_then(ast::MethodCallExpr::cast)?;
|
||||||
let method_call = ast::MethodCallExpr::cast(parent)?;
|
|
||||||
highlight_method_call(sema, &method_call)
|
highlight_method_call(sema, &method_call)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue