diff options
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r-- | crates/ra_syntax/src/yellow.rs | 11 |
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 | ||
21 | pub type GreenNode = rowan::GreenNode<RaTypes>; | 21 | pub type GreenNode = rowan::GreenNode<RaTypes>; |
22 | 22 | ||
23 | #[derive(Clone, PartialEq, Eq, Hash)] | 23 | #[derive(PartialEq, Eq, Hash)] |
24 | pub struct TreePtr<T: TransparentNewType<Repr = rowan::SyntaxNode<RaTypes>>>( | 24 | pub 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 | ||
50 | impl<T> Clone for TreePtr<T> | ||
51 | where | ||
52 | T: TransparentNewType<Repr = rowan::SyntaxNode<RaTypes>>, | ||
53 | { | ||
54 | fn clone(&self) -> TreePtr<T> { | ||
55 | TreePtr(self.0.clone()) | ||
56 | } | ||
57 | } | ||
58 | |||
50 | impl<T> fmt::Debug for TreePtr<T> | 59 | impl<T> fmt::Debug for TreePtr<T> |
51 | where | 60 | where |
52 | T: TransparentNewType<Repr = rowan::SyntaxNode<RaTypes>>, | 61 | T: TransparentNewType<Repr = rowan::SyntaxNode<RaTypes>>, |