diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-16 13:14:48 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-16 13:14:48 +0000 |
commit | c49b5b7468a9954af86fd1724276261f396aba5d (patch) | |
tree | f9b9126cd0cc9a2829de3cdb20f681b354fbe67b /crates/ide/src/syntax_highlighting | |
parent | 1a82af3527e476d52410ff4dfd2fb4c57466abcb (diff) | |
parent | f5a81ec4683613bd62624811733345d627f2127b (diff) |
Merge #7498
7498: Clone for update r=matklad a=matklad
rowan counterpart https://github.com/rust-analyzer/rowan/pull/93
#6857
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ide/src/syntax_highlighting')
-rw-r--r-- | crates/ide/src/syntax_highlighting/format.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide/src/syntax_highlighting/format.rs b/crates/ide/src/syntax_highlighting/format.rs index 8c67a0863..e503abc93 100644 --- a/crates/ide/src/syntax_highlighting/format.rs +++ b/crates/ide/src/syntax_highlighting/format.rs | |||
@@ -28,7 +28,7 @@ pub(super) fn highlight_format_string( | |||
28 | } | 28 | } |
29 | 29 | ||
30 | fn is_format_string(string: &ast::String) -> Option<()> { | 30 | fn is_format_string(string: &ast::String) -> Option<()> { |
31 | let parent = string.syntax().parent(); | 31 | let parent = string.syntax().parent()?; |
32 | 32 | ||
33 | let name = parent.parent().and_then(ast::MacroCall::cast)?.path()?.segment()?.name_ref()?; | 33 | let name = parent.parent().and_then(ast::MacroCall::cast)?.path()?.segment()?.name_ref()?; |
34 | if !matches!(name.text(), "format_args" | "format_args_nl") { | 34 | if !matches!(name.text(), "format_args" | "format_args_nl") { |