mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Some import resolution boilerplate
This commit is contained in:
parent
5f8068cea8
commit
bcdcfa9df2
3 changed files with 163 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue