2561: Split generic and non-generic paths r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2019-12-14 18:16:48 +00:00 committed by GitHub
commit d6223253b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 480 additions and 357 deletions

View file

@ -188,10 +188,9 @@ impl<'a> CompletionContext<'a> {
self.is_path_type = path.syntax().parent().and_then(ast::PathType::cast).is_some();
self.has_type_args = segment.type_arg_list().is_some();
if let Some(mut path) = hir::Path::from_ast(path.clone()) {
if !path.is_ident() {
path.segments.pop().unwrap();
self.path_prefix = Some(path);
if let Some(path) = hir::Path::from_ast(path.clone()) {
if let Some(path_prefix) = path.qualifier() {
self.path_prefix = Some(path_prefix);
return;
}
}