diff options
author | Aleksey Kladov <[email protected]> | 2018-11-20 16:24:58 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-11-20 16:24:58 +0000 |
commit | bcdcfa9df222667e6bfcbb1a8923bdc55bd57dc0 (patch) | |
tree | 09a6cab3c8ca22970a9afcf037e293b3d9ddbfa1 /crates/ra_syntax/src/ast | |
parent | 5f8068cea83b4f74ca3a9afb033a405d79727140 (diff) |
Some import resolution boilerplate
Diffstat (limited to 'crates/ra_syntax/src/ast')
-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() |