diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-02-17 12:50:54 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-02-17 12:50:54 +0100 |
| commit | 91e45458e3d4c1e15660570841f0263f3d891278 (patch) | |
| tree | a0b86374c083fc758110c55c24fd4bef21ac2caa /src/syntax/span.rs | |
| parent | c7a9bac99224af9673f26ec140af48e1728fe3b5 (diff) | |
Make values hashable
Diffstat (limited to 'src/syntax/span.rs')
| -rw-r--r-- | src/syntax/span.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/syntax/span.rs b/src/syntax/span.rs index ab2797f6..d1e29dd3 100644 --- a/src/syntax/span.rs +++ b/src/syntax/span.rs @@ -5,7 +5,7 @@ use std::ops::Range; use crate::source::SourceId; /// A value with the span it corresponds to in the source code. -#[derive(Copy, Clone, Eq, PartialEq)] +#[derive(Copy, Clone, Eq, PartialEq, Hash)] pub struct Spanned<T> { /// The spanned value. pub v: T, @@ -46,7 +46,7 @@ impl<T: Debug> Debug for Spanned<T> { } /// Bounds of a slice of source code. -#[derive(Copy, Clone, Eq, PartialEq)] +#[derive(Copy, Clone, Eq, PartialEq, Hash)] pub struct Span { /// The id of the source file. pub source: SourceId, |
