mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-02 04:48:13 +00:00
migrate ra_db to new rowan
This commit is contained in:
parent
b88775af7f
commit
fe53b28250
3 changed files with 20 additions and 11 deletions
|
|
@ -20,7 +20,7 @@ impl Types for RaTypes {
|
|||
|
||||
pub type GreenNode = rowan::GreenNode<RaTypes>;
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Hash)]
|
||||
#[derive(PartialEq, Eq, Hash)]
|
||||
pub struct TreePtr<T: TransparentNewType<Repr = rowan::SyntaxNode<RaTypes>>>(
|
||||
pub(crate) rowan::TreePtr<RaTypes, T>,
|
||||
);
|
||||
|
|
@ -47,6 +47,15 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
impl<T> Clone for TreePtr<T>
|
||||
where
|
||||
T: TransparentNewType<Repr = rowan::SyntaxNode<RaTypes>>,
|
||||
{
|
||||
fn clone(&self) -> TreePtr<T> {
|
||||
TreePtr(self.0.clone())
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> fmt::Debug for TreePtr<T>
|
||||
where
|
||||
T: TransparentNewType<Repr = rowan::SyntaxNode<RaTypes>>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue