fix unsafe warnings

This commit is contained in:
Jorge Aparicio
2016-10-07 17:48:37 -05:00
parent a02ecc8eef
commit d05514cb20
7 changed files with 16 additions and 22 deletions

View File

@@ -1,5 +1,3 @@
use core::intrinsics;
use int::Int;
macro_rules! div {
@@ -13,7 +11,7 @@ macro_rules! div {
let b = (b ^ s_b) - s_b;
let s = s_a ^ s_b;
let r = udiv!((a as $uty), (b as $uty));
let r = udiv!(a as $uty, b as $uty);
(r as $ty ^ s) - s
}
}
@@ -29,7 +27,7 @@ macro_rules! mod_ {
let s = a >> (<$ty>::bits() - 1);
let a = (a ^ s) - s;
let r = urem!((a as $uty), (b as $uty));
let r = urem!(a as $uty, b as $uty);
(r as $ty ^ s) - s
}
}