aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax/src
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2020-09-12 18:18:14 +0100
committerLukas Wirth <[email protected]>2020-09-12 18:19:19 +0100
commita898752881779a328462ad9f2db291073f2f134f (patch)
tree4b6894416bf4f2a875b5bd4a3bc20510a00821d5 /crates/syntax/src
parentc8623461a57e7882ac47b5da13a1a03efa58f603 (diff)
Reimplement import merging by making it recursive properly nesting all levels
Diffstat (limited to 'crates/syntax/src')
-rw-r--r--crates/syntax/src/ast/edit.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/syntax/src/ast/edit.rs b/crates/syntax/src/ast/edit.rs
index 8b1c65dd6..45cf31f13 100644
--- a/crates/syntax/src/ast/edit.rs
+++ b/crates/syntax/src/ast/edit.rs
@@ -347,6 +347,7 @@ impl ast::UseTree {
347 self.clone() 347 self.clone()
348 } 348 }
349 349
350 /// Splits off the given prefix, making it the path component of the use tree, appending the rest of the path to all UseTreeList items.
350 #[must_use] 351 #[must_use]
351 pub fn split_prefix(&self, prefix: &ast::Path) -> ast::UseTree { 352 pub fn split_prefix(&self, prefix: &ast::Path) -> ast::UseTree {
352 let suffix = if self.path().as_ref() == Some(prefix) && self.use_tree_list().is_none() { 353 let suffix = if self.path().as_ref() == Some(prefix) && self.use_tree_list().is_none() {