diff --git a/src/syntax/resolved.rs b/src/syntax/resolved.rs index 548f0e3..35e7497 100644 --- a/src/syntax/resolved.rs +++ b/src/syntax/resolved.rs @@ -22,7 +22,6 @@ use crate::{ /// # See also /// [`SyntaxNode`] /// [`SyntaxNode::new_root_with_resolver`] -#[derive(Clone)] #[repr(transparent)] pub struct ResolvedNode { pub(super) syntax: SyntaxNode, @@ -41,6 +40,14 @@ impl ResolvedNode { } } +impl Clone for ResolvedNode { + fn clone(&self) -> Self { + Self { + syntax: self.syntax.clone(), + } + } +} + impl Deref for ResolvedNode { type Target = SyntaxNode; @@ -77,6 +84,14 @@ impl ResolvedToken { } } +impl Clone for ResolvedToken { + fn clone(&self) -> Self { + Self { + syntax: self.syntax.clone(), + } + } +} + impl Deref for ResolvedToken { type Target = SyntaxToken;