Skip to content

Commit 7db605c

Browse files
committed
disable 64-bit CheckedMul on 32-bit
code generation problem reported as issue #8449
1 parent 076b91f commit 7db605c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/libstd/num/num.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,8 @@ impl CheckedMul for i32 {
827827
}
828828
}
829829

830-
#[cfg(not(stage0))]
830+
// FIXME: #8449: should not be disabled on 32-bit
831+
#[cfg(not(stage0), target_word_size = "64")]
831832
impl CheckedMul for i64 {
832833
#[inline]
833834
fn checked_mul(&self, v: &i64) -> Option<i64> {
@@ -893,7 +894,8 @@ impl CheckedMul for u32 {
893894
}
894895
}
895896

896-
#[cfg(not(stage0))]
897+
// FIXME: #8449: should not be disabled on 32-bit
898+
#[cfg(not(stage0), target_word_size = "64")]
897899
impl CheckedMul for u64 {
898900
#[inline]
899901
fn checked_mul(&self, v: &u64) -> Option<u64> {

0 commit comments

Comments
 (0)