diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-11-21 11:57:32 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-11-21 11:57:32 +0000 |
commit | 031bc868293539714157e3d93cc338b011f5661d (patch) | |
tree | 624843cfddada855a6a80380e817bb188596c441 /crates/ra_syntax/src | |
parent | 713c3ea30b38199e05e1f70094d85177f16915f8 (diff) | |
parent | 5a61b218f8869532ccb6be9dccff9e7d8641bf49 (diff) |
Merge #236
236: WIP: Module name resolution r=matklad a=matklad
work towards #231
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r-- | crates/ra_syntax/src/ast/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/ast/mod.rs b/crates/ra_syntax/src/ast/mod.rs index 7077e3492..91c67119f 100644 --- a/crates/ra_syntax/src/ast/mod.rs +++ b/crates/ra_syntax/src/ast/mod.rs | |||
@@ -315,6 +315,12 @@ impl<'a> PathSegment<'a> { | |||
315 | } | 315 | } |
316 | } | 316 | } |
317 | 317 | ||
318 | impl<'a> UseTree<'a> { | ||
319 | pub fn has_star(self) -> bool { | ||
320 | self.syntax().children().any(|it| it.kind() == STAR) | ||
321 | } | ||
322 | } | ||
323 | |||
318 | impl<'a> UseTreeList<'a> { | 324 | impl<'a> UseTreeList<'a> { |
319 | pub fn parent_use_tree(self) -> UseTree<'a> { | 325 | pub fn parent_use_tree(self) -> UseTree<'a> { |
320 | self.syntax() | 326 | self.syntax() |