diff options
Diffstat (limited to 'crates/ra_ide_api/src/completion/completion_context.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/completion_context.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/completion/completion_context.rs b/crates/ra_ide_api/src/completion/completion_context.rs index 359f2cffa..a8c8cc7b0 100644 --- a/crates/ra_ide_api/src/completion/completion_context.rs +++ b/crates/ra_ide_api/src/completion/completion_context.rs | |||
@@ -27,7 +27,7 @@ pub(crate) struct CompletionContext<'a> { | |||
27 | pub(super) is_pat_binding: bool, | 27 | pub(super) is_pat_binding: bool, |
28 | /// A single-indent path, like `foo`. `::foo` should not be considered a trivial path. | 28 | /// A single-indent path, like `foo`. `::foo` should not be considered a trivial path. |
29 | pub(super) is_trivial_path: bool, | 29 | pub(super) is_trivial_path: bool, |
30 | /// If not a trivial, path, the prefix (qualifier). | 30 | /// If not a trivial path, the prefix (qualifier). |
31 | pub(super) path_prefix: Option<hir::Path>, | 31 | pub(super) path_prefix: Option<hir::Path>, |
32 | pub(super) after_if: bool, | 32 | pub(super) after_if: bool, |
33 | /// `true` if we are a statement or a last expr in the block. | 33 | /// `true` if we are a statement or a last expr in the block. |
@@ -151,6 +151,7 @@ impl<'a> CompletionContext<'a> { | |||
151 | Some(it) => it, | 151 | Some(it) => it, |
152 | None => return, | 152 | None => return, |
153 | }; | 153 | }; |
154 | |||
154 | if let Some(segment) = ast::PathSegment::cast(parent) { | 155 | if let Some(segment) = ast::PathSegment::cast(parent) { |
155 | let path = segment.parent_path(); | 156 | let path = segment.parent_path(); |
156 | self.is_call = path | 157 | self.is_call = path |
@@ -167,6 +168,7 @@ impl<'a> CompletionContext<'a> { | |||
167 | return; | 168 | return; |
168 | } | 169 | } |
169 | } | 170 | } |
171 | |||
170 | if path.qualifier().is_none() { | 172 | if path.qualifier().is_none() { |
171 | self.is_trivial_path = true; | 173 | self.is_trivial_path = true; |
172 | 174 | ||