aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-07 14:00:39 +0000
committerAleksey Kladov <[email protected]>2019-01-08 08:20:15 +0000
commitfe53b282500f32c2d0cc1dfee1d7ccddfedac583 (patch)
tree826967cd421105444382e408c792f8c32504f600 /crates/ra_syntax
parentb88775af7fdfb06df922325ab48237592d5afecb (diff)
migrate ra_db to new rowan
Diffstat (limited to 'crates/ra_syntax')
-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>>,