From dde69276d47818174c35523c8ed86b6888b6d02b Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 13 Jan 2020 14:36:40 +0100 Subject: =?UTF-8?q?Refactor=20expressions=20and=20create=20tuples=20and=20?= =?UTF-8?q?objects=20=F0=9F=A7=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/syntax/span.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/syntax/span.rs') diff --git a/src/syntax/span.rs b/src/syntax/span.rs index 10188ed4..e5c6912b 100644 --- a/src/syntax/span.rs +++ b/src/syntax/span.rs @@ -4,7 +4,7 @@ use std::fmt::{self, Display, Formatter}; /// Annotates a value with the part of the source code it corresponds to. -#[derive(Copy, Clone, Eq, PartialEq)] +#[derive(Copy, Clone, Eq, PartialEq, Hash)] pub struct Spanned { pub v: T, pub span: Span, @@ -37,7 +37,7 @@ impl Display for Spanned where T: std::fmt::Debug { debug_display!(Spanned; T where T: std::fmt::Debug); /// Describes a slice of source code. -#[derive(Copy, Clone, Eq, PartialEq)] +#[derive(Copy, Clone, Eq, PartialEq, Hash)] pub struct Span { pub start: Position, pub end: Position, -- cgit v1.2.3