Skip to content

Commit 5f89180

Browse files
committed
make token trees eq
1 parent 3e367b5 commit 5f89180

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

crates/ra_hir/src/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ impl MacroDef {
6767
}
6868
}
6969

70-
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
70+
#[derive(Debug, Clone, PartialEq, Eq)]
7171
pub struct MacroInput {
7272
// Should be token trees
7373
pub text: String,

crates/ra_tt/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,22 @@ impl TokenId {
3333
}
3434
}
3535

36-
#[derive(Debug, Clone)]
36+
#[derive(Debug, Clone, PartialEq, Eq)]
3737
pub enum TokenTree {
3838
Leaf(Leaf),
3939
Subtree(Subtree),
4040
}
4141
impl_froms!(TokenTree: Leaf, Subtree);
4242

43-
#[derive(Debug, Clone)]
43+
#[derive(Debug, Clone, PartialEq, Eq)]
4444
pub enum Leaf {
4545
Literal(Literal),
4646
Punct(Punct),
4747
Ident(Ident),
4848
}
4949
impl_froms!(Leaf: Literal, Punct, Ident);
5050

51-
#[derive(Debug, Clone)]
51+
#[derive(Debug, Clone, PartialEq, Eq)]
5252
pub struct Subtree {
5353
pub delimiter: Delimiter,
5454
pub token_trees: Vec<TokenTree>,
@@ -62,7 +62,7 @@ pub enum Delimiter {
6262
None,
6363
}
6464

65-
#[derive(Debug, Clone)]
65+
#[derive(Debug, Clone, PartialEq, Eq)]
6666
pub struct Literal {
6767
pub text: SmolStr,
6868
}
@@ -79,7 +79,7 @@ pub enum Spacing {
7979
Joint,
8080
}
8181

82-
#[derive(Debug, Clone)]
82+
#[derive(Debug, Clone, PartialEq, Eq)]
8383
pub struct Ident {
8484
pub text: SmolStr,
8585
pub id: TokenId,

0 commit comments

Comments
 (0)