mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-04 15:45:25 +00:00
fix completion bugs
This commit is contained in:
parent
488326ffa7
commit
13d2fd32ab
30 changed files with 179 additions and 135 deletions
|
@ -38,6 +38,8 @@ pub enum PathKind {
|
|||
Self_,
|
||||
Super,
|
||||
Crate,
|
||||
// Absolute path
|
||||
Abs,
|
||||
}
|
||||
|
||||
impl Path {
|
||||
|
@ -57,6 +59,11 @@ impl Path {
|
|||
let mut segments = Vec::new();
|
||||
loop {
|
||||
let segment = path.segment()?;
|
||||
|
||||
if segment.has_colon_colon() {
|
||||
kind = PathKind::Abs;
|
||||
}
|
||||
|
||||
match segment.kind()? {
|
||||
ast::PathSegmentKind::Name(name) => {
|
||||
let args = segment
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue