mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Reimplement import merging by making it recursive properly nesting all levels
This commit is contained in:
parent
c8623461a5
commit
a898752881
4 changed files with 262 additions and 81 deletions
|
@ -347,6 +347,7 @@ impl ast::UseTree {
|
|||
self.clone()
|
||||
}
|
||||
|
||||
/// Splits off the given prefix, making it the path component of the use tree, appending the rest of the path to all UseTreeList items.
|
||||
#[must_use]
|
||||
pub fn split_prefix(&self, prefix: &ast::Path) -> ast::UseTree {
|
||||
let suffix = if self.path().as_ref() == Some(prefix) && self.use_tree_list().is_none() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue