summary refs log tree commit diff
path: root/src/librustc_data_structures
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2016-12-16 18:01:32 +0100
committerest31 <MTest31@outlook.com>2016-12-30 15:17:30 +0100
commit0a481fe5d2a028df806e68a1b91177924a0cda35 (patch)
treeb8f4030a34576819f4cce007a031d24d32ed2747 /src/librustc_data_structures
parentdd10c5a5033cd90af65e32a08c43ce5e34fc9168 (diff)
downloadrust-0a481fe5d2a028df806e68a1b91177924a0cda35.tar.gz
rust-0a481fe5d2a028df806e68a1b91177924a0cda35.zip
Fix rebase fallout and compilation fixes
Diffstat (limited to 'src/librustc_data_structures')
-rw-r--r--src/librustc_data_structures/Cargo.toml1
-rw-r--r--src/librustc_data_structures/lib.rs2
-rw-r--r--src/librustc_data_structures/stable_hasher.rs5
3 files changed, 6 insertions, 2 deletions
diff --git a/src/librustc_data_structures/Cargo.toml b/src/librustc_data_structures/Cargo.toml
index e2e16059d98..bb610374810 100644
--- a/src/librustc_data_structures/Cargo.toml
+++ b/src/librustc_data_structures/Cargo.toml
@@ -11,3 +11,4 @@ crate-type = ["dylib"]
 [dependencies]
 log = { path = "../liblog" }
 serialize = { path = "../libserialize" }
+rustc_i128 = { path = "../librustc_i128" }
diff --git a/src/librustc_data_structures/lib.rs b/src/librustc_data_structures/lib.rs
index 86f244d65dd..d3ec674daed 100644
--- a/src/librustc_data_structures/lib.rs
+++ b/src/librustc_data_structures/lib.rs
@@ -44,6 +44,8 @@ extern crate serialize as rustc_serialize; // used by deriving
 #[cfg(unix)]
 extern crate libc;
 
+extern crate rustc_i128;
+
 pub use rustc_serialize::hex::ToHex;
 
 pub mod array_vec;
diff --git a/src/librustc_data_structures/stable_hasher.rs b/src/librustc_data_structures/stable_hasher.rs
index ed97c3dde5e..87048eff5b7 100644
--- a/src/librustc_data_structures/stable_hasher.rs
+++ b/src/librustc_data_structures/stable_hasher.rs
@@ -13,13 +13,14 @@ use std::marker::PhantomData;
 use std::mem;
 use blake2b::Blake2bHasher;
 use rustc_serialize::leb128;
+use rustc_i128::{u128,i128};
 
 fn write_unsigned_leb128_to_buf(buf: &mut [u8; 16], value: u64) -> usize {
-    leb128::write_unsigned_leb128_to(value, |i, v| buf[i] = v)
+    leb128::write_unsigned_leb128_to(value as u128, |i, v| buf[i] = v)
 }
 
 fn write_signed_leb128_to_buf(buf: &mut [u8; 16], value: i64) -> usize {
-    leb128::write_signed_leb128_to(value, |i, v| buf[i] = v)
+    leb128::write_signed_leb128_to(value as i128, |i, v| buf[i] = v)
 }
 
 /// When hashing something that ends up affecting properties like symbol names. We