Skip to content

Commit 526c505

Browse files
committed
Fix rebase fallout and compilation fixes
1 parent 4ebddcc commit 526c505

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

src/Cargo.lock

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/librustc_data_structures/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ crate-type = ["dylib"]
1111
[dependencies]
1212
log = { path = "../liblog" }
1313
serialize = { path = "../libserialize" }
14+
rustc_i128 = { path = "../librustc_i128" }

src/librustc_data_structures/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ extern crate serialize as rustc_serialize; // used by deriving
4444
#[cfg(unix)]
4545
extern crate libc;
4646

47+
extern crate rustc_i128;
48+
4749
pub use rustc_serialize::hex::ToHex;
4850

4951
pub mod array_vec;

src/librustc_data_structures/stable_hasher.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ use std::marker::PhantomData;
1313
use std::mem;
1414
use blake2b::Blake2bHasher;
1515
use rustc_serialize::leb128;
16+
use rustc_i128::{u128,i128};
1617

1718
fn write_unsigned_leb128_to_buf(buf: &mut [u8; 16], value: u64) -> usize {
18-
leb128::write_unsigned_leb128_to(value, |i, v| buf[i] = v)
19+
leb128::write_unsigned_leb128_to(value as u128, |i, v| buf[i] = v)
1920
}
2021

2122
fn write_signed_leb128_to_buf(buf: &mut [u8; 16], value: i64) -> usize {
22-
leb128::write_signed_leb128_to(value, |i, v| buf[i] = v)
23+
leb128::write_signed_leb128_to(value as i128, |i, v| buf[i] = v)
2324
}
2425

2526
/// When hashing something that ends up affecting properties like symbol names. We

src/libserialize/leb128.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fn write_to_vec(vec: &mut Vec<u8>, position: usize, byte: u8) {
2626
/// The callback `write` is called once for each position
2727
/// that is to be written to with the byte to be encoded
2828
/// at that position.
29-
pub fn write_unsigned_leb128_to<W>(mut value: u64, mut write: W) -> usize
29+
pub fn write_unsigned_leb128_to<W>(mut value: u128, mut write: W) -> usize
3030
where W: FnMut(usize, u8)
3131
{
3232
let mut position = 0;
@@ -48,7 +48,7 @@ pub fn write_unsigned_leb128_to<W>(mut value: u64, mut write: W) -> usize
4848
position
4949
}
5050

51-
pub fn write_unsigned_leb128(out: &mut Vec<u8>, start_position: usize, value: u64) -> usize {
51+
pub fn write_unsigned_leb128(out: &mut Vec<u8>, start_position: usize, value: u128) -> usize {
5252
write_unsigned_leb128_to(value, |i, v| write_to_vec(out, start_position+i, v))
5353
}
5454

0 commit comments

Comments
 (0)