internal: remove one more immutable tree

This commit is contained in:
Aleksey Kladov
2021-05-10 19:04:41 +03:00
parent ab528e85f7
commit 0650f77dd9
7 changed files with 57 additions and 56 deletions

View File

@@ -47,6 +47,12 @@ pub trait AstNode {
{
Self::cast(self.syntax().clone_for_update()).unwrap()
}
fn clone_subtree(&self) -> Self
where
Self: Sized,
{
Self::cast(self.syntax().clone_subtree()).unwrap()
}
}
/// Like `AstNode`, but wraps tokens rather than interior nodes.