From fa0e96e0f70c428aa80872205eb929b3b1dfea13 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Tue, 14 Aug 2012 21:13:05 -0700 Subject: [PATCH] Fix build breakage --- src/libcore/float.rs | 3 ++- src/libcore/int-template.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libcore/float.rs b/src/libcore/float.rs index 943f075b319..48ff3bb0374 100644 --- a/src/libcore/float.rs +++ b/src/libcore/float.rs @@ -41,6 +41,7 @@ import f64::{lgamma, ln, log_radix, ln1p, log10, log2, ilog_radix}; import f64::{modf, pow, round, sinh, tanh, tgamma, trunc}; import f64::signbit; import f64::{j0, j1, jn, y0, y1, yn}; +import num::from_int; const NaN: float = 0.0/0.0; @@ -523,7 +524,7 @@ fn test_traits() { fn test(ten: &U) { assert (ten.to_int() == 10); - let two = from_int(2); + let two: U = from_int(2); assert (two.to_int() == 2); assert (ten.add(two) == from_int(12)); diff --git a/src/libcore/int-template.rs b/src/libcore/int-template.rs index b310b1f34f5..0819d702456 100644 --- a/src/libcore/int-template.rs +++ b/src/libcore/int-template.rs @@ -1,5 +1,6 @@ import T = inst::T; import cmp::{Eq, Ord}; +import num::from_int; export min_value, max_value; export min, max; @@ -238,7 +239,7 @@ fn test_interfaces() { fn test(ten: U) { assert (ten.to_int() == 10); - let two = from_int(2); + let two: U = from_int(2); assert (two.to_int() == 2); assert (ten.add(two) == from_int(12));