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/typing.rs | |
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/typing.rs')
-rw-r--r-- | crates/ide/src/typing.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide/src/typing.rs b/crates/ide/src/typing.rs index a718faf63..e10b7d98e 100644 --- a/crates/ide/src/typing.rs +++ b/crates/ide/src/typing.rs | |||
@@ -108,7 +108,7 @@ fn on_dot_typed(file: &SourceFile, offset: TextSize) -> Option<TextEdit> { | |||
108 | }; | 108 | }; |
109 | let current_indent_len = TextSize::of(current_indent); | 109 | let current_indent_len = TextSize::of(current_indent); |
110 | 110 | ||
111 | let parent = whitespace.syntax().parent(); | 111 | let parent = whitespace.syntax().parent()?; |
112 | // Make sure dot is a part of call chain | 112 | // Make sure dot is a part of call chain |
113 | if !matches!(parent.kind(), FIELD_EXPR | METHOD_CALL_EXPR) { | 113 | if !matches!(parent.kind(), FIELD_EXPR | METHOD_CALL_EXPR) { |
114 | return None; | 114 | return None; |