From cfb3808cad46e78a428f4df17488ca907fc8c9f3 Mon Sep 17 00:00:00 2001 From: bing Date: Sat, 8 Jun 2024 23:28:45 +0800 Subject: [PATCH] remove TODO --- src/parser/types.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/parser/types.rs b/src/parser/types.rs index 0c07079c7..c4584e26d 100644 --- a/src/parser/types.rs +++ b/src/parser/types.rs @@ -156,7 +156,6 @@ pub struct Ty { } /// The module preceding structs, functions, or variables. -// TODO: Hash should probably be implemented manually, right now two alias might have different span and so this will give different hashes #[derive(Default, Debug, Clone, Serialize, Deserialize, Hash, PartialEq, Eq)] pub enum ModulePath { #[default] @@ -393,7 +392,7 @@ impl FnSig { } /// Any kind of text that can represent a type, a variable, a function name, etc. -#[derive(Debug, Default, Clone, Eq, Serialize, Deserialize)] +#[derive(Debug, Default, Clone, Eq, Hash, Serialize, Deserialize)] pub struct Ident { pub value: String, pub span: Span, @@ -405,13 +404,6 @@ impl PartialEq for Ident { } } -impl Hash for Ident { - fn hash(&self, state: &mut H) { - self.value.hash(state); - self.span.hash(state); - } -} - impl Ident { pub fn new(value: String, span: Span) -> Self { Self { value, span }