From 8b0298ce095b6dd635f7ed35dc97f1874157040b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 27 Aug 2018 10:01:31 +0300 Subject: scopes --- crates/libsyntax2/src/yellow/syntax.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'crates/libsyntax2/src/yellow/syntax.rs') diff --git a/crates/libsyntax2/src/yellow/syntax.rs b/crates/libsyntax2/src/yellow/syntax.rs index 0045598d4..75b6cb7dc 100644 --- a/crates/libsyntax2/src/yellow/syntax.rs +++ b/crates/libsyntax2/src/yellow/syntax.rs @@ -1,4 +1,7 @@ -use std::{fmt, sync::Arc}; +use std::{ + fmt, sync::Arc, + hash::{Hasher, Hash}, +}; use smol_str::SmolStr; @@ -27,6 +30,11 @@ impl PartialEq> for SyntaxNode { } impl Eq for SyntaxNode {} +impl Hash for SyntaxNode { + fn hash(&self, state: &mut H) { + self.red.hash(state) + } +} pub type SyntaxNodeRef<'a> = SyntaxNode>; -- cgit v1.2.3