diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_data_structures/stable_hasher.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/librustc_data_structures/stable_hasher.rs b/src/librustc_data_structures/stable_hasher.rs index 092208cfe1d..ce62021ac17 100644 --- a/src/librustc_data_structures/stable_hasher.rs +++ b/src/librustc_data_structures/stable_hasher.rs @@ -429,6 +429,16 @@ impl<T, CTX> HashStable<CTX> for ::std::mem::Discriminant<T> { } } +impl<T, CTX> HashStable<CTX> for ::std::ops::RangeInclusive<T> + where T: HashStable<CTX> +{ + #[inline] + fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) { + self.start().hash_stable(ctx, hasher); + self.end().hash_stable(ctx, hasher); + } +} + impl<I: vec::Idx, T, CTX> HashStable<CTX> for vec::IndexVec<I, T> where T: HashStable<CTX>, { |
