diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-23 07:45:08 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-23 07:45:08 +0000 |
commit | 1d7baef0e96d6c1db2d049f3770588f07b8d739f (patch) | |
tree | ebfe1de5f52c088f20ffd3d1c591514e844307e0 /crates/ra_syntax | |
parent | 488326ffa74bea2773eed9c1849e9d3b9eac9b2d (diff) | |
parent | 13d2fd32ab5df598496c6abbf46591ff05cd3def (diff) |
Merge #603
603: fix completion bugs r=gfreezy a=gfreezy
The result is as below.
before:
![image](https://user-images.githubusercontent.com/510012/51483467-0f641400-1dd4-11e9-9921-ef21d15cc343.png)
after:
![image](https://user-images.githubusercontent.com/510012/51483433-fb201700-1dd3-11e9-9730-c2a5d3dd5f5a.png)
Co-authored-by: gfreezy <[email protected]>
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r-- | crates/ra_syntax/src/ast.rs | 7 |
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 | ||
339 | impl Path { | 346 | impl Path { |