mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Merge #2561
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:
commit
d6223253b6
19 changed files with 480 additions and 357 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue