aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-12-14 18:16:48 +0000
committerGitHub <[email protected]>2019-12-14 18:16:48 +0000
commitd6223253b628b279f9ddae8f83f7173d01f6b32c (patch)
tree12f2ccc5c52c1c0b67932d3a35fe18668b8e5d62 /crates/ra_ide
parent202ad1e2d9376565cb273cf085be600ed10e5a93 (diff)
parent2619950b3b405324ab1c1745876165c834b3b4b9 (diff)
Merge #2561
2561: Split generic and non-generic paths r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide')
-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 }