Some import resolution boilerplate

This commit is contained in:
Aleksey Kladov 2018-11-20 19:24:58 +03:00
parent 5f8068cea8
commit bcdcfa9df2
3 changed files with 163 additions and 0 deletions

View file

@ -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()