diff --git a/src/libcore/core.rc b/src/libcore/core.rc index 0e1530d3233c..ea2645107cfa 100644 --- a/src/libcore/core.rc +++ b/src/libcore/core.rc @@ -84,54 +84,38 @@ export private; // Built-in-type support modules /// Operations and constants for `int` -#[legacy_exports] #[path = "int-template"] mod int { - #[legacy_exports]; - use inst::{ pow }; - export pow; + pub use inst::{ pow }; #[path = "int.rs"] - #[legacy_exports] mod inst; } /// Operations and constants for `i8` -#[legacy_exports] #[path = "int-template"] mod i8 { - #[legacy_exports]; #[path = "i8.rs"] - #[legacy_exports] mod inst; } /// Operations and constants for `i16` -#[legacy_exports] #[path = "int-template"] mod i16 { - #[legacy_exports]; #[path = "i16.rs"] - #[legacy_exports] mod inst; } /// Operations and constants for `i32` -#[legacy_exports] #[path = "int-template"] mod i32 { - #[legacy_exports]; #[path = "i32.rs"] - #[legacy_exports] mod inst; } /// Operations and constants for `i64` -#[legacy_exports] #[path = "int-template"] mod i64 { - #[legacy_exports]; #[path = "i64.rs"] - #[legacy_exports] mod inst; } diff --git a/src/libcore/int-template.rs b/src/libcore/int-template.rs index d24a10be6ce5..ddd262050007 100644 --- a/src/libcore/int-template.rs +++ b/src/libcore/int-template.rs @@ -7,20 +7,6 @@ use cmp::{Eq, Ord}; use from_str::FromStr; use num::from_int; -export min_value, max_value; -export min, max; -export add, sub, mul, div, rem; -export lt, le, eq, ne, ge, gt; -export is_positive, is_negative; -export is_nonpositive, is_nonnegative; -export range; -export compl; -export abs; -export parse_bytes, from_str, to_str, to_str_bytes, str; -export num, ord, eq, times, timesi; -export bits, bytes; -export str; - pub const bits : uint = inst::bits; pub const bytes : uint = (inst::bits / 8); @@ -190,7 +176,7 @@ pub fn str(i: T) -> ~str { return to_str(i, 10u); } // FIXME: Has alignment issues on windows and 32-bit linux (#2609) #[test] #[ignore] -pub fn test_from_str() { +fn test_from_str() { assert from_str(~"0") == Some(0 as T); assert from_str(~"3") == Some(3 as T); assert from_str(~"10") == Some(10 as T); @@ -210,7 +196,7 @@ pub fn test_from_str() { // FIXME: Has alignment issues on windows and 32-bit linux (#2609) #[test] #[ignore] -pub fn test_parse_bytes() { +fn test_parse_bytes() { use str::to_bytes; assert parse_bytes(to_bytes(~"123"), 10u) == Some(123 as T); assert parse_bytes(to_bytes(~"1001"), 2u) == Some(9 as T); @@ -235,7 +221,7 @@ pub fn test_parse_bytes() { } #[test] -pub fn test_to_str() { +fn test_to_str() { assert (to_str(0 as T, 10u) == ~"0"); assert (to_str(1 as T, 10u) == ~"1"); assert (to_str(-1 as T, 10u) == ~"-1"); @@ -244,7 +230,7 @@ pub fn test_to_str() { } #[test] -pub fn test_interfaces() { +fn test_interfaces() { fn test(+ten: U) { assert (ten.to_int() == 10); @@ -263,7 +249,7 @@ pub fn test_interfaces() { } #[test] -pub fn test_times() { +fn test_times() { use iter::Times; let ten = 10 as T; let mut accum = 0; @@ -274,7 +260,7 @@ pub fn test_times() { #[test] #[should_fail] #[ignore(cfg(windows))] -pub fn test_times_negative() { +fn test_times_negative() { use iter::Times; for (-10).times { log(error, ~"nope!"); } } diff --git a/src/libcore/int-template/i16.rs b/src/libcore/int-template/i16.rs index 75a8409f6edd..9e7055c3e7a6 100644 --- a/src/libcore/int-template/i16.rs +++ b/src/libcore/int-template/i16.rs @@ -1,2 +1,2 @@ -type T = i16; -const bits: uint = u16::bits; \ No newline at end of file +pub type T = i16; +pub const bits: uint = u16::bits; \ No newline at end of file diff --git a/src/libcore/int-template/i32.rs b/src/libcore/int-template/i32.rs index 043ab95f579f..6545eaffdac9 100644 --- a/src/libcore/int-template/i32.rs +++ b/src/libcore/int-template/i32.rs @@ -1,2 +1,2 @@ -type T = i32; -const bits: uint = u32::bits; +pub type T = i32; +pub const bits: uint = u32::bits; diff --git a/src/libcore/int-template/i64.rs b/src/libcore/int-template/i64.rs index cea3c77c7f58..c6ed97e8162c 100644 --- a/src/libcore/int-template/i64.rs +++ b/src/libcore/int-template/i64.rs @@ -1,2 +1,2 @@ -type T = i64; -const bits: uint = u64::bits; \ No newline at end of file +pub type T = i64; +pub const bits: uint = u64::bits; \ No newline at end of file diff --git a/src/libcore/int-template/i8.rs b/src/libcore/int-template/i8.rs index 25614791ad63..0a2823e63c6e 100644 --- a/src/libcore/int-template/i8.rs +++ b/src/libcore/int-template/i8.rs @@ -1,2 +1,2 @@ -type T = i8; -const bits: uint = u8::bits; \ No newline at end of file +pub type T = i8; +pub const bits: uint = u8::bits; \ No newline at end of file diff --git a/src/libcore/int-template/int.rs b/src/libcore/int-template/int.rs index 7e7cddf9b300..8b898b173ac3 100644 --- a/src/libcore/int-template/int.rs +++ b/src/libcore/int-template/int.rs @@ -1,8 +1,8 @@ -type T = int; -const bits: uint = uint::bits; +pub type T = int; +pub const bits: uint = uint::bits; /// Returns `base` raised to the power of `exponent` -fn pow(base: int, exponent: uint) -> int { +pub fn pow(base: int, exponent: uint) -> int { if exponent == 0u { return 1; } //Not mathemtically true if ~[base == 0] if base == 0 { return 0; } let mut my_pow = exponent;