From 13d2fd32ab5df598496c6abbf46591ff05cd3def Mon Sep 17 00:00:00 2001 From: gfreezy Date: Wed, 23 Jan 2019 13:21:29 +0800 Subject: fix completion bugs --- crates/ra_syntax/src/ast.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'crates/ra_syntax') diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs index 5a5f56057..bcbd4c60c 100644 --- a/crates/ra_syntax/src/ast.rs +++ b/crates/ra_syntax/src/ast.rs @@ -334,6 +334,13 @@ impl PathSegment { }; Some(res) } + + pub fn has_colon_colon(&self) -> bool { + match self.syntax.first_child().map(|s| s.kind()) { + Some(COLONCOLON) => true, + _ => false, + } + } } impl Path { -- cgit v1.2.3