aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-08-19 16:33:25 +0100
committerAleksey Kladov <[email protected]>2020-08-19 16:33:25 +0100
commit0b62b990ba69efd23f26218d0461a2cef15e593a (patch)
treee791b8056775d04e105f9c1bce49ba29125c3df0
parent422ac441c29de730fe0adccc7bb3152ad5559039 (diff)
Minor
-rw-r--r--crates/ide/src/syntax_highlighting.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ide/src/syntax_highlighting.rs b/crates/ide/src/syntax_highlighting.rs
index 549c5efe7..38546ead3 100644
--- a/crates/ide/src/syntax_highlighting.rs
+++ b/crates/ide/src/syntax_highlighting.rs
@@ -706,8 +706,7 @@ fn highlight_func_by_name_ref(
706 sema: &Semantics<RootDatabase>, 706 sema: &Semantics<RootDatabase>,
707 name_ref: &ast::NameRef, 707 name_ref: &ast::NameRef,
708) -> Option<Highlight> { 708) -> Option<Highlight> {
709 let parent = name_ref.syntax().parent()?; 709 let method_call = name_ref.syntax().parent().and_then(ast::MethodCallExpr::cast)?;
710 let method_call = ast::MethodCallExpr::cast(parent)?;
711 highlight_method_call(sema, &method_call) 710 highlight_method_call(sema, &method_call)
712} 711}
713 712