From 5f89180fd9b1b0e8a0fd7d8988485c4ba598d70e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 12 Feb 2019 20:57:13 +0300 Subject: make token trees eq --- crates/ra_tt/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/ra_tt') diff --git a/crates/ra_tt/src/lib.rs b/crates/ra_tt/src/lib.rs index c1f37b889..0b0b9b4d2 100644 --- a/crates/ra_tt/src/lib.rs +++ b/crates/ra_tt/src/lib.rs @@ -33,14 +33,14 @@ impl TokenId { } } -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq, Eq)] pub enum TokenTree { Leaf(Leaf), Subtree(Subtree), } impl_froms!(TokenTree: Leaf, Subtree); -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq, Eq)] pub enum Leaf { Literal(Literal), Punct(Punct), @@ -48,7 +48,7 @@ pub enum Leaf { } impl_froms!(Leaf: Literal, Punct, Ident); -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq, Eq)] pub struct Subtree { pub delimiter: Delimiter, pub token_trees: Vec, @@ -62,7 +62,7 @@ pub enum Delimiter { None, } -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq, Eq)] pub struct Literal { pub text: SmolStr, } @@ -79,7 +79,7 @@ pub enum Spacing { Joint, } -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq, Eq)] pub struct Ident { pub text: SmolStr, pub id: TokenId, -- cgit v1.2.3