about summary refs log tree commit diff
path: root/src/librustc_data_structures
diff options
context:
space:
mode:
authorAna-Maria Mihalache <mihalacheana.maria@yahoo.com>2020-04-16 15:15:46 +0000
committerAna-Maria Mihalache <mihalacheana.maria@yahoo.com>2020-04-16 15:15:51 +0000
commit8f081d5b2bd92f621f2db6841971e7c38e0e8f26 (patch)
tree54b8f7389d90d3a1581eb64a925cea0acad04928 /src/librustc_data_structures
parent4e4d49d60fd696c4036d438292673a2d7fd34519 (diff)
downloadrust-8f081d5b2bd92f621f2db6841971e7c38e0e8f26.tar.gz
rust-8f081d5b2bd92f621f2db6841971e7c38e0e8f26.zip
rustc_target::abi: add Primitive variant to FieldsShape.
Diffstat (limited to 'src/librustc_data_structures')
-rw-r--r--src/librustc_data_structures/stable_hasher.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/librustc_data_structures/stable_hasher.rs b/src/librustc_data_structures/stable_hasher.rs
index a98e77cebd8..97b02eaef35 100644
--- a/src/librustc_data_structures/stable_hasher.rs
+++ b/src/librustc_data_structures/stable_hasher.rs
@@ -210,6 +210,12 @@ impl<CTX> HashStable<CTX> for ::std::num::NonZeroU32 {
     }
 }
 
+impl<CTX> HashStable<CTX> for ::std::num::NonZeroUsize {
+    fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) {
+        self.get().hash_stable(ctx, hasher)
+    }
+}
+
 impl<CTX> HashStable<CTX> for f32 {
     fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) {
         let val: u32 = unsafe { ::std::mem::transmute(*self) };