diff options
author | Aleksey Kladov <[email protected]> | 2020-08-19 16:33:25 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-08-19 16:33:25 +0100 |
commit | 0b62b990ba69efd23f26218d0461a2cef15e593a (patch) | |
tree | e791b8056775d04e105f9c1bce49ba29125c3df0 /crates/ide/src | |
parent | 422ac441c29de730fe0adccc7bb3152ad5559039 (diff) |
Minor
Diffstat (limited to 'crates/ide/src')
-rw-r--r-- | crates/ide/src/syntax_highlighting.rs | 3 |
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 | ||