use std::ops::Deref;
use std::rc::Rc;
+use rustc_data_structures::stable_hasher::{StableHasher, StableHasherResult,
+ HashStable};
+
#[derive(Clone)]
pub struct RcSlice<T> {
data: Rc<Box<[T]>>,
fmt::Debug::fmt(self.deref(), f)
}
}
+
+impl<CTX, T> HashStable<CTX> for RcSlice<T>
+ where T: HashStable<CTX>
+{
+ fn hash_stable<W: StableHasherResult>(&self,
+ hcx: &mut CTX,
+ hasher: &mut StableHasher<W>) {
+ (**self).hash_stable(hcx, hasher);
+ }
+}