about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-11-25 16:30:23 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-11-30 12:11:19 +0000
commit3d31e5c9810227ceb56d6d3a5228ca28b1aca890 (patch)
tree4394b120584c2394dd8b8e9356816701f90789ed /compiler/rustc_data_structures/src
parent8de4b138455add55bde6de5553a933a2ab79b71f (diff)
downloadrust-3d31e5c9810227ceb56d6d3a5228ca28b1aca890.tar.gz
rust-3d31e5c9810227ceb56d6d3a5228ca28b1aca890.zip
s/WithStableHash/WithCachedTypeInfo/
Diffstat (limited to 'compiler/rustc_data_structures/src')
-rw-r--r--compiler/rustc_data_structures/src/intern.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/compiler/rustc_data_structures/src/intern.rs b/compiler/rustc_data_structures/src/intern.rs
index 11cbff8ea6a..9985aeaab57 100644
--- a/compiler/rustc_data_structures/src/intern.rs
+++ b/compiler/rustc_data_structures/src/intern.rs
@@ -118,33 +118,33 @@ where
 /// This is useful if you have values that you intern but never (can?) use for stable
 /// hashing.
 #[derive(Copy, Clone)]
-pub struct WithStableHash<T> {
+pub struct WithCachedTypeInfo<T> {
     pub internee: T,
     pub stable_hash: Fingerprint,
 }
 
-impl<T: PartialEq> PartialEq for WithStableHash<T> {
+impl<T: PartialEq> PartialEq for WithCachedTypeInfo<T> {
     #[inline]
     fn eq(&self, other: &Self) -> bool {
         self.internee.eq(&other.internee)
     }
 }
 
-impl<T: Eq> Eq for WithStableHash<T> {}
+impl<T: Eq> Eq for WithCachedTypeInfo<T> {}
 
-impl<T: Ord> PartialOrd for WithStableHash<T> {
-    fn partial_cmp(&self, other: &WithStableHash<T>) -> Option<Ordering> {
+impl<T: Ord> PartialOrd for WithCachedTypeInfo<T> {
+    fn partial_cmp(&self, other: &WithCachedTypeInfo<T>) -> Option<Ordering> {
         Some(self.internee.cmp(&other.internee))
     }
 }
 
-impl<T: Ord> Ord for WithStableHash<T> {
-    fn cmp(&self, other: &WithStableHash<T>) -> Ordering {
+impl<T: Ord> Ord for WithCachedTypeInfo<T> {
+    fn cmp(&self, other: &WithCachedTypeInfo<T>) -> Ordering {
         self.internee.cmp(&other.internee)
     }
 }
 
-impl<T> Deref for WithStableHash<T> {
+impl<T> Deref for WithCachedTypeInfo<T> {
     type Target = T;
 
     #[inline]
@@ -153,7 +153,7 @@ impl<T> Deref for WithStableHash<T> {
     }
 }
 
-impl<T: Hash> Hash for WithStableHash<T> {
+impl<T: Hash> Hash for WithCachedTypeInfo<T> {
     #[inline]
     fn hash<H: Hasher>(&self, s: &mut H) {
         if self.stable_hash != Fingerprint::ZERO {
@@ -164,7 +164,7 @@ impl<T: Hash> Hash for WithStableHash<T> {
     }
 }
 
-impl<T: HashStable<CTX>, CTX> HashStable<CTX> for WithStableHash<T> {
+impl<T: HashStable<CTX>, CTX> HashStable<CTX> for WithCachedTypeInfo<T> {
     fn hash_stable(&self, hcx: &mut CTX, hasher: &mut StableHasher) {
         if self.stable_hash == Fingerprint::ZERO || cfg!(debug_assertions) {
             // No cached hash available. This can only mean that incremental is disabled.