From bcdcfa9df222667e6bfcbb1a8923bdc55bd57dc0 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 20 Nov 2018 19:24:58 +0300 Subject: Some import resolution boilerplate --- crates/ra_syntax/src/ast/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crates/ra_syntax/src/ast') 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> { } } +impl<'a> UseTree<'a> { + pub fn has_star(self) -> bool { + self.syntax().children().any(|it| it.kind() == STAR) + } +} + impl<'a> UseTreeList<'a> { pub fn parent_use_tree(self) -> UseTree<'a> { self.syntax() -- cgit v1.2.3