aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax/src/ast/edit_in_place.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/syntax/src/ast/edit_in_place.rs')
-rw-r--r--crates/syntax/src/ast/edit_in_place.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/syntax/src/ast/edit_in_place.rs b/crates/syntax/src/ast/edit_in_place.rs
index 2676ed8c9..ca8103668 100644
--- a/crates/syntax/src/ast/edit_in_place.rs
+++ b/crates/syntax/src/ast/edit_in_place.rs
@@ -239,6 +239,16 @@ impl ast::TypeBoundList {
239 } 239 }
240} 240}
241 241
242impl ast::PathSegment {
243 pub fn get_or_create_generic_arg_list(&self) -> ast::GenericArgList {
244 if self.generic_arg_list().is_none() {
245 let arg_list = make::generic_arg_list().clone_for_update();
246 ted::append_child(self.syntax(), arg_list.syntax())
247 }
248 self.generic_arg_list().unwrap()
249 }
250}
251
242impl ast::UseTree { 252impl ast::UseTree {
243 pub fn remove(&self) { 253 pub fn remove(&self) {
244 for &dir in [Direction::Next, Direction::Prev].iter() { 254 for &dir in [Direction::Next, Direction::Prev].iter() {