aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r--crates/ra_ide/src/completion/completion_context.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/ra_ide/src/completion/completion_context.rs b/crates/ra_ide/src/completion/completion_context.rs
index ca0a483d4..981da2b79 100644
--- a/crates/ra_ide/src/completion/completion_context.rs
+++ b/crates/ra_ide/src/completion/completion_context.rs
@@ -188,10 +188,9 @@ impl<'a> CompletionContext<'a> {
188 self.is_path_type = path.syntax().parent().and_then(ast::PathType::cast).is_some(); 188 self.is_path_type = path.syntax().parent().and_then(ast::PathType::cast).is_some();
189 self.has_type_args = segment.type_arg_list().is_some(); 189 self.has_type_args = segment.type_arg_list().is_some();
190 190
191 if let Some(mut path) = hir::Path::from_ast(path.clone()) { 191 if let Some(path) = hir::Path::from_ast(path.clone()) {
192 if !path.is_ident() { 192 if let Some(path_prefix) = path.qualifier() {
193 path.segments.pop().unwrap(); 193 self.path_prefix = Some(path_prefix);
194 self.path_prefix = Some(path);
195 return; 194 return;
196 } 195 }
197 } 196 }