aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src')
-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 {