aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast.rs
diff options
context:
space:
mode:
authorgfreezy <[email protected]>2019-01-23 05:21:29 +0000
committergfreezy <[email protected]>2019-01-23 07:43:47 +0000
commit13d2fd32ab5df598496c6abbf46591ff05cd3def (patch)
treeebfe1de5f52c088f20ffd3d1c591514e844307e0 /crates/ra_syntax/src/ast.rs
parent488326ffa74bea2773eed9c1849e9d3b9eac9b2d (diff)
fix completion bugs
Diffstat (limited to 'crates/ra_syntax/src/ast.rs')
-rw-r--r--crates/ra_syntax/src/ast.rs7
1 files changed, 7 insertions, 0 deletions
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 {
334 }; 334 };
335 Some(res) 335 Some(res)
336 } 336 }
337
338 pub fn has_colon_colon(&self) -> bool {
339 match self.syntax.first_child().map(|s| s.kind()) {
340 Some(COLONCOLON) => true,
341 _ => false,
342 }
343 }
337} 344}
338 345
339impl Path { 346impl Path {