diff options
author | Aleksey Kladov <[email protected]> | 2019-01-07 14:00:39 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-08 08:20:15 +0000 |
commit | fe53b282500f32c2d0cc1dfee1d7ccddfedac583 (patch) | |
tree | 826967cd421105444382e408c792f8c32504f600 /crates/ra_syntax | |
parent | b88775af7fdfb06df922325ab48237592d5afecb (diff) |
migrate ra_db to new rowan
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>>, |