about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2012-09-28 12:03:54 -0700
committerGraydon Hoare <graydon@mozilla.com>2012-09-28 12:03:54 -0700
commit0792ebe08af6fbf80d89eeb3ee23241dce05a5b7 (patch)
treee025466b9e5526e53e1e4296b5944f10a669ac1d /src
parent3efe4997348110da45c4dad8254f73928638e3ff (diff)
Finish de-exporting int-template and the int modules.
Diffstat (limited to 'src')
-rw-r--r--src/libcore/core.rc18
-rw-r--r--src/libcore/int-template.rs26
-rw-r--r--src/libcore/int-template/i16.rs4
-rw-r--r--src/libcore/int-template/i32.rs4
-rw-r--r--src/libcore/int-template/i64.rs4
-rw-r--r--src/libcore/int-template/i8.rs4
-rw-r--r--src/libcore/int-template/int.rs6
7 files changed, 18 insertions, 48 deletions
diff --git a/src/libcore/core.rc b/src/libcore/core.rc
index 0e1530d3233..ea2645107cf 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 d24a10be6ce..ddd26205000 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<U:num::Num cmp::Eq>(+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 75a8409f6ed..9e7055c3e7a 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 043ab95f579..6545eaffdac 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 cea3c77c7f5..c6ed97e8162 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 25614791ad6..0a2823e63c6 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 7e7cddf9b30..8b898b173ac 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;