///
/// That second condition is usually not required for hash functions
/// (e.g. `Hash`). In practice this means that `hash_stable` must feed any
-/// information into the hasher that a `PartialEq` comparision takes into
+/// information into the hasher that a `PartialEq` comparison takes into
/// account. See [#49300](https://github.com/rust-lang/rust/issues/49300)
/// for an example where violating this invariant has caused trouble in the
/// past.
}
}
+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>,
{