Skip to content

Commit e8e7ad6

Browse files
committed
Implement HashStable for RangeInclusive.
1 parent 79bde05 commit e8e7ad6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/librustc_data_structures/stable_hasher.rs

+10
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,16 @@ impl<T, CTX> HashStable<CTX> for ::std::mem::Discriminant<T> {
429429
}
430430
}
431431

432+
impl<T, CTX> HashStable<CTX> for ::std::ops::RangeInclusive<T>
433+
where T: HashStable<CTX>
434+
{
435+
#[inline]
436+
fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) {
437+
self.start().hash_stable(ctx, hasher);
438+
self.end().hash_stable(ctx, hasher);
439+
}
440+
}
441+
432442
impl<I: vec::Idx, T, CTX> HashStable<CTX> for vec::IndexVec<I, T>
433443
where T: HashStable<CTX>,
434444
{

0 commit comments

Comments
 (0)