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_hir/src/macros.rs | 2 +- crates/ra_tt/src/lib.rs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'crates') diff --git a/crates/ra_hir/src/macros.rs b/crates/ra_hir/src/macros.rs index dd477e9f9..45128c7df 100644 --- a/crates/ra_hir/src/macros.rs +++ b/crates/ra_hir/src/macros.rs @@ -67,7 +67,7 @@ impl MacroDef { } } -#[derive(Debug, Clone, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, PartialEq, Eq)] pub struct MacroInput { // Should be token trees pub text: String, 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