Skip to content

Commit c9d099d

Browse files
committed
Fix copy-paste mistakes
1 parent 35f33c1 commit c9d099d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/libcore/num/int-template/int.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ mod inst {
3636
impl BitCount for int {
3737
/// Counts the number of bits set. Wraps LLVM's `ctpop` intrinsic.
3838
#[inline(always)]
39-
fn population_count(&self) -> int { (*self as i32).population_count() as uint }
39+
fn population_count(&self) -> int { (*self as i32).population_count() as int }
4040

4141
/// Counts the number of leading zeros. Wraps LLVM's `ctlz` intrinsic.
4242
#[inline(always)]
43-
fn leading_zeros(&self) -> int { (*self as i32).leading_zeros() as uint }
43+
fn leading_zeros(&self) -> int { (*self as i32).leading_zeros() as int }
4444

4545
/// Counts the number of trailing zeros. Wraps LLVM's `cttz` intrinsic.
4646
#[inline(always)]
47-
fn trailing_zeros(&self) -> int { (*self as i32).trailing_zeros() as uint }
47+
fn trailing_zeros(&self) -> int { (*self as i32).trailing_zeros() as int }
4848
}
4949

5050
#[cfg(target_word_size = "64")]
@@ -60,7 +60,7 @@ mod inst {
6060

6161
/// Counts the number of trailing zeros. Wraps LLVM's `cttz` intrinsic.
6262
#[inline(always)]
63-
fn trailing_zeros(&self) -> int { (*self as i32).trailing_zeros() as int }
63+
fn trailing_zeros(&self) -> int { (*self as i64).trailing_zeros() as int }
6464
}
6565

6666
/// Returns `base` raised to the power of `exponent`

src/libcore/num/uint-template/uint.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pub mod inst {
7474

7575
/// Counts the number of trailing zeros. Wraps LLVM's `cttz` intrinsic.
7676
#[inline(always)]
77-
fn trailing_zeros(&self) -> uint { (*self as i32).trailing_zeros() as uint }
77+
fn trailing_zeros(&self) -> uint { (*self as i64).trailing_zeros() as uint }
7878
}
7979

8080
///

0 commit comments

Comments
 (0)