fix completion bugs

This commit is contained in:
gfreezy 2019-01-23 13:21:29 +08:00
parent 488326ffa7
commit 13d2fd32ab
30 changed files with 179 additions and 135 deletions

View file

@ -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