Skip to content

Commit fa0e96e

Browse files
committed
Fix build breakage
1 parent ccd3643 commit fa0e96e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/libcore/float.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import f64::{lgamma, ln, log_radix, ln1p, log10, log2, ilog_radix};
4141
import f64::{modf, pow, round, sinh, tanh, tgamma, trunc};
4242
import f64::signbit;
4343
import f64::{j0, j1, jn, y0, y1, yn};
44+
import num::from_int;
4445

4546
const NaN: float = 0.0/0.0;
4647

@@ -523,7 +524,7 @@ fn test_traits() {
523524
fn test<U:num::Num>(ten: &U) {
524525
assert (ten.to_int() == 10);
525526

526-
let two = from_int(2);
527+
let two: U = from_int(2);
527528
assert (two.to_int() == 2);
528529

529530
assert (ten.add(two) == from_int(12));

src/libcore/int-template.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import T = inst::T;
22
import cmp::{Eq, Ord};
3+
import num::from_int;
34

45
export min_value, max_value;
56
export min, max;
@@ -238,7 +239,7 @@ fn test_interfaces() {
238239
fn test<U:num::Num>(ten: U) {
239240
assert (ten.to_int() == 10);
240241

241-
let two = from_int(2);
242+
let two: U = from_int(2);
242243
assert (two.to_int() == 2);
243244

244245
assert (ten.add(two) == from_int(12));

0 commit comments

Comments
 (0)