about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJonathan Turner <jonathandturner@users.noreply.github.com>2016-09-28 10:33:58 -0700
committerGitHub <noreply@github.com>2016-09-28 10:33:58 -0700
commit46746012e7521f90a19a6a642b29cfb84b1e8650 (patch)
tree6bb1d9a8ac1d931dbb4fd8594da0572b8adf624b
parent723ddd1ca759ba6fb2db303456122d2d2b6a55bc (diff)
parent4053af91526571e797f394d2303a68b2dbfa83b8 (diff)
downloadrust-46746012e7521f90a19a6a642b29cfb84b1e8650.tar.gz
rust-46746012e7521f90a19a6a642b29cfb84b1e8650.zip
Rollup merge of #36795 - TimNN:fix-36793, r=eddyb
TypeIdHasher: hash usize as u64

Fixes #36793.
-rw-r--r--src/librustc/ty/util.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc/ty/util.rs b/src/librustc/ty/util.rs
index c8fd27f066c..8fe5756a60e 100644
--- a/src/librustc/ty/util.rs
+++ b/src/librustc/ty/util.rs
@@ -436,7 +436,7 @@ impl<'a, 'gcx, 'tcx, H: Hasher> TypeVisitor<'tcx> for TypeIdHasher<'a, 'gcx, 'tc
             TyInt(i) => self.hash(i),
             TyUint(u) => self.hash(u),
             TyFloat(f) => self.hash(f),
-            TyArray(_, n) => self.hash(n),
+            TyArray(_, n) => self.hash(n as u64),
             TyRawPtr(m) |
             TyRef(_, m) => self.hash(m.mutbl),
             TyClosure(def_id, _) |
@@ -447,14 +447,14 @@ impl<'a, 'gcx, 'tcx, H: Hasher> TypeVisitor<'tcx> for TypeIdHasher<'a, 'gcx, 'tc
                 self.hash(f.unsafety);
                 self.hash(f.abi);
                 self.hash(f.sig.variadic());
-                self.hash(f.sig.inputs().skip_binder().len());
+                self.hash(f.sig.inputs().skip_binder().len() as u64);
             }
             TyTrait(ref data) => {
                 self.def_id(data.principal.def_id());
                 self.hash(data.builtin_bounds);
             }
             TyTuple(tys) => {
-                self.hash(tys.len());
+                self.hash(tys.len() as u64);
             }
             TyParam(p) => {
                 self.hash(p.idx);