aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax/src/ast.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/syntax/src/ast.rs')
-rw-r--r--crates/syntax/src/ast.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/syntax/src/ast.rs b/crates/syntax/src/ast.rs
index 7f472d4db..a8071b51d 100644
--- a/crates/syntax/src/ast.rs
+++ b/crates/syntax/src/ast.rs
@@ -47,6 +47,12 @@ pub trait AstNode {
47 { 47 {
48 Self::cast(self.syntax().clone_for_update()).unwrap() 48 Self::cast(self.syntax().clone_for_update()).unwrap()
49 } 49 }
50 fn clone_subtree(&self) -> Self
51 where
52 Self: Sized,
53 {
54 Self::cast(self.syntax().clone_subtree()).unwrap()
55 }
50} 56}
51 57
52/// Like `AstNode`, but wraps tokens rather than interior nodes. 58/// Like `AstNode`, but wraps tokens rather than interior nodes.