aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r--crates/ra_syntax/src/yellow.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/yellow.rs b/crates/ra_syntax/src/yellow.rs
index 38e680a9c..f31efa174 100644
--- a/crates/ra_syntax/src/yellow.rs
+++ b/crates/ra_syntax/src/yellow.rs
@@ -20,7 +20,7 @@ impl Types for RaTypes {
20 20
21pub type GreenNode = rowan::GreenNode<RaTypes>; 21pub type GreenNode = rowan::GreenNode<RaTypes>;
22 22
23#[derive(Clone, PartialEq, Eq, Hash)] 23#[derive(PartialEq, Eq, Hash)]
24pub struct TreePtr<T: TransparentNewType<Repr = rowan::SyntaxNode<RaTypes>>>( 24pub struct TreePtr<T: TransparentNewType<Repr = rowan::SyntaxNode<RaTypes>>>(
25 pub(crate) rowan::TreePtr<RaTypes, T>, 25 pub(crate) rowan::TreePtr<RaTypes, T>,
26); 26);
@@ -47,6 +47,15 @@ where
47 } 47 }
48} 48}
49 49
50impl<T> Clone for TreePtr<T>
51where
52 T: TransparentNewType<Repr = rowan::SyntaxNode<RaTypes>>,
53{
54 fn clone(&self) -> TreePtr<T> {
55 TreePtr(self.0.clone())
56 }
57}
58
50impl<T> fmt::Debug for TreePtr<T> 59impl<T> fmt::Debug for TreePtr<T>
51where 60where
52 T: TransparentNewType<Repr = rowan::SyntaxNode<RaTypes>>, 61 T: TransparentNewType<Repr = rowan::SyntaxNode<RaTypes>>,