mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-08 03:20:37 +00:00
split import assist
This commit is contained in:
parent
481713a0e1
commit
ea3504057e
4 changed files with 126 additions and 0 deletions
|
@ -363,6 +363,12 @@ impl<'a> PathSegment<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> Path<'a> {
|
||||
pub fn parent_path(self) -> Option<Path<'a>> {
|
||||
self.syntax().parent().and_then(Path::cast)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> UseTree<'a> {
|
||||
pub fn has_star(self) -> bool {
|
||||
self.syntax().children().any(|it| it.kind() == STAR)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue