about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2012-09-21 18:10:45 -0700
committerGraydon Hoare <graydon@mozilla.com>2012-09-21 18:11:43 -0700
commitdffe188991325b4e803fdd0da7c1563ce0fa27f4 (patch)
treee8f65929b804a38550dc9fdcf24021e6a7920304 /src/libcore
parent60443d48881bfbc7a305e807390e74b327f100b8 (diff)
Install new pub/priv/export rules as defaults, old rules accessible under #[legacy_exports];
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/at_vec.rs7
-rw-r--r--src/libcore/box.rs1
-rw-r--r--src/libcore/cast.rs2
-rw-r--r--src/libcore/cleanup.rs1
-rw-r--r--src/libcore/cmath.rs8
-rw-r--r--src/libcore/cmp.rs8
-rw-r--r--src/libcore/comm.rs2
-rw-r--r--src/libcore/core.rc84
-rw-r--r--src/libcore/core.rs4
-rw-r--r--src/libcore/dlist.rs1
-rw-r--r--src/libcore/extfmt.rs4
-rw-r--r--src/libcore/f32.rs1
-rw-r--r--src/libcore/f64.rs1
-rw-r--r--src/libcore/flate.rs1
-rw-r--r--src/libcore/float.rs1
-rw-r--r--src/libcore/future.rs1
-rw-r--r--src/libcore/gc.rs1
-rw-r--r--src/libcore/io.rs3
-rw-r--r--src/libcore/libc.rs208
-rw-r--r--src/libcore/logging.rs1
-rw-r--r--src/libcore/os.rs11
-rw-r--r--src/libcore/path.rs2
-rw-r--r--src/libcore/pipes.rs4
-rw-r--r--src/libcore/private.rs2
-rw-r--r--src/libcore/ptr.rs2
-rw-r--r--src/libcore/rand.rs2
-rw-r--r--src/libcore/result.rs1
-rw-r--r--src/libcore/rt.rs1
-rw-r--r--src/libcore/run.rs2
-rw-r--r--src/libcore/send_map.rs2
-rw-r--r--src/libcore/stackwalk.rs2
-rw-r--r--src/libcore/str.rs6
-rw-r--r--src/libcore/sys.rs2
-rw-r--r--src/libcore/task.rs1
-rw-r--r--src/libcore/to_str.rs1
-rw-r--r--src/libcore/unicode.rs2
-rw-r--r--src/libcore/util.rs1
-rw-r--r--src/libcore/vec.rs9
38 files changed, 347 insertions, 46 deletions
diff --git a/src/libcore/at_vec.rs b/src/libcore/at_vec.rs
index bc0f4c62af7..7864983bde2 100644
--- a/src/libcore/at_vec.rs
+++ b/src/libcore/at_vec.rs
@@ -15,6 +15,7 @@ export traits;
 
 #[abi = "cdecl"]
 extern mod rustrt {
+    #[legacy_exports];
     fn vec_reserve_shared_actual(++t: *sys::TypeDesc,
                                  ++v: **vec::raw::VecRepr,
                                  ++n: libc::size_t);
@@ -22,6 +23,7 @@ extern mod rustrt {
 
 #[abi = "rust-intrinsic"]
 extern mod rusti {
+    #[legacy_exports];
     fn move_val_init<T>(&dst: T, -src: T);
 }
 
@@ -135,6 +137,7 @@ pure fn from_elem<T: Copy>(n_elts: uint, t: T) -> @[T] {
 
 #[cfg(notest)]
 mod traits {
+    #[legacy_exports];
     #[cfg(stage0)]
     impl<T: Copy> @[T]: Add<&[const T],@[T]> {
         #[inline(always)]
@@ -153,9 +156,11 @@ mod traits {
 }
 
 #[cfg(test)]
-mod traits {}
+mod traits {
+    #[legacy_exports];}
 
 mod raw {
+    #[legacy_exports];
     type VecRepr = vec::raw::VecRepr;
     type SliceRepr = vec::raw::SliceRepr;
 
diff --git a/src/libcore/box.rs b/src/libcore/box.rs
index fe1e10af715..f7db82864e6 100644
--- a/src/libcore/box.rs
+++ b/src/libcore/box.rs
@@ -10,6 +10,7 @@ use intrinsic::TyDesc;
 export ptr_eq, raw;
 
 mod raw {
+    #[legacy_exports];
 
     struct BoxHeaderRepr {
         ref_count: uint,
diff --git a/src/libcore/cast.rs b/src/libcore/cast.rs
index 1f811b0fc05..93467404868 100644
--- a/src/libcore/cast.rs
+++ b/src/libcore/cast.rs
@@ -8,6 +8,7 @@ export copy_lifetime, copy_lifetime_vec;
 
 #[abi = "rust-intrinsic"]
 extern mod rusti {
+    #[legacy_exports];
     fn forget<T>(-x: T);
     fn reinterpret_cast<T, U>(e: T) -> U;
 }
@@ -97,6 +98,7 @@ unsafe fn copy_lifetime_vec<S,T>(_ptr: &a/[S], ptr: &T) -> &a/T {
 
 #[cfg(test)]
 mod tests {
+    #[legacy_exports];
 
     #[test]
     fn test_reinterpret_cast() {
diff --git a/src/libcore/cleanup.rs b/src/libcore/cleanup.rs
index 3435e933ea2..64276df6dfe 100644
--- a/src/libcore/cleanup.rs
+++ b/src/libcore/cleanup.rs
@@ -121,6 +121,7 @@ pub unsafe fn annihilate() {
 
 /// Bindings to the runtime
 extern mod rustrt {
+    #[legacy_exports];
     #[rust_stack]
     /*priv*/ fn rust_get_task() -> *c_void;
 }
diff --git a/src/libcore/cmath.rs b/src/libcore/cmath.rs
index 881dd959e8a..c04d4915ba2 100644
--- a/src/libcore/cmath.rs
+++ b/src/libcore/cmath.rs
@@ -23,6 +23,7 @@ use libc::c_double;
 #[link_name = "m"]
 #[abi = "cdecl"]
 extern mod c_double {
+    #[legacy_exports];
 
     // Alpabetically sorted by link_name
 
@@ -98,6 +99,7 @@ extern mod c_double {
 #[link_name = "m"]
 #[abi = "cdecl"]
 extern mod c_float {
+    #[legacy_exports];
 
     // Alpabetically sorted by link_name
 
@@ -166,6 +168,7 @@ extern mod c_float {
 // FIXME obtain machine float/math constants automatically (Issue #1986)
 
 mod c_float_targ_consts {
+    #[legacy_exports];
     const radix: uint = 2u;
     const mantissa_digits: uint = 24u;
     const digits: uint = 6u;
@@ -181,6 +184,7 @@ mod c_float_targ_consts {
 }
 
 mod c_double_targ_consts {
+    #[legacy_exports];
     const radix: uint = 2u;
     const mantissa_digits: uint = 53u;
     const digits: uint = 15u;
@@ -200,6 +204,7 @@ mod c_double_targ_consts {
 FIXME use these once they can be parsed (see Issue #1433)
 
 mod c_float_math_consts {
+    #[legacy_exports];
     const pi: c_float = 0x1.921fb6p+1_f32;
     const div_1_pi: c_float = 0x1.45f306p-2_f32;
     const div_2_pi: c_float = 0x1.45f306p-1_f32;
@@ -216,6 +221,7 @@ mod c_float_math_consts {
 }
 
 mod c_double_math_consts {
+    #[legacy_exports];
     const pi: c_double = 0x1.921fb54442d18p+1_f64;
     const div_1_pi: c_double = 0x1.45f306dc9c883p-2_f64;
     const div_2_pi: c_double = 0x1.45f306dc9c883p-1_f64;
@@ -232,6 +238,7 @@ mod c_double_math_consts {
 }
 
 mod c_float_targ_consts {
+    #[legacy_exports];
     const radix: uint = 2u;
     const mantissa_digits: uint = 24u;
     const digits: uint = 6u;
@@ -245,6 +252,7 @@ mod c_float_targ_consts {
 }
 
 mod c_double_targ_consts {
+    #[legacy_exports];
     const radix: uint = 2u;
     const mantissa_digits: uint = 53u;
     const digits: uint = 15u;
diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs
index 35c3dcc71ab..362062e945d 100644
--- a/src/libcore/cmp.rs
+++ b/src/libcore/cmp.rs
@@ -24,6 +24,7 @@ export Eq;
 // Awful hack to work around duplicate lang items in core test.
 #[cfg(notest)]
 mod nounittest {
+    #[legacy_exports];
     /**
      * Trait for values that can be compared for a sort-order.
      *
@@ -75,10 +76,12 @@ mod nounittest {
 }
 
 #[cfg(test)]
-mod nounittest {}
+mod nounittest {
+    #[legacy_exports];}
 
 #[cfg(test)]
 mod unittest {
+    #[legacy_exports];
     #[cfg(stage0)]
     trait Ord {
         pure fn lt(&&other: self) -> bool;
@@ -111,7 +114,8 @@ mod unittest {
 }
 
 #[cfg(notest)]
-mod unittest {}
+mod unittest {
+    #[legacy_exports];}
 
 #[cfg(stage0)]
 pure fn lt<T: Ord>(v1: &T, v2: &T) -> bool {
diff --git a/src/libcore/comm.rs b/src/libcore/comm.rs
index cdf5224a071..b99eec8bb5b 100644
--- a/src/libcore/comm.rs
+++ b/src/libcore/comm.rs
@@ -275,6 +275,7 @@ type port_id = int;
 
 #[abi = "cdecl"]
 extern mod rustrt {
+    #[legacy_exports];
     fn rust_port_id_send(target_port: port_id, data: *()) -> libc::uintptr_t;
 
     fn new_port(unit_sz: libc::size_t) -> *rust_port;
@@ -297,6 +298,7 @@ extern mod rustrt {
 
 #[abi = "rust-intrinsic"]
 extern mod rusti {
+    #[legacy_exports];
     fn init<T>() -> T;
 }
 
diff --git a/src/libcore/core.rc b/src/libcore/core.rc
index f6701dfbf03..d6424106868 100644
--- a/src/libcore/core.rc
+++ b/src/libcore/core.rc
@@ -85,43 +85,54 @@ export private;
 /// Operations and constants for `int`
 #[path = "int-template"]
 mod int {
+    #[legacy_exports];
     use inst::{ pow };
     export pow;
     #[path = "int.rs"]
+    #[legacy_exports]
     mod inst;
 }
 
 /// Operations and constants for `i8`
 #[path = "int-template"]
 mod i8 {
+    #[legacy_exports];
     #[path = "i8.rs"]
+    #[legacy_exports]
     mod inst;
 }
 
 /// Operations and constants for `i16`
 #[path = "int-template"]
 mod i16 {
+    #[legacy_exports];
     #[path = "i16.rs"]
+    #[legacy_exports]
     mod inst;
 }
 
 /// Operations and constants for `i32`
 #[path = "int-template"]
 mod i32 {
+    #[legacy_exports];
     #[path = "i32.rs"]
+    #[legacy_exports]
     mod inst;
 }
 
 /// Operations and constants for `i64`
 #[path = "int-template"]
 mod i64 {
+    #[legacy_exports];
     #[path = "i64.rs"]
+    #[legacy_exports]
     mod inst;
 }
 
 /// Operations and constants for `uint`
 #[path = "uint-template"]
 mod uint {
+    #[legacy_exports];
     use inst::{
         div_ceil, div_round, div_floor, iterate,
         next_power_of_two
@@ -130,135 +141,208 @@ mod uint {
     next_power_of_two;
 
     #[path = "uint.rs"]
+    #[legacy_exports]
     mod inst;
 }
 
 /// Operations and constants for `u8`
 #[path = "uint-template"]
 mod u8 {
+    #[legacy_exports];
     use inst::is_ascii;
     export is_ascii;
 
     #[path = "u8.rs"]
+    #[legacy_exports]
     mod inst;
 }
 
 /// Operations and constants for `u16`
 #[path = "uint-template"]
 mod u16 {
+    #[legacy_exports];
     #[path = "u16.rs"]
+    #[legacy_exports]
     mod inst;
 }
 
 /// Operations and constants for `u32`
 #[path = "uint-template"]
 mod u32 {
+    #[legacy_exports];
     #[path = "u32.rs"]
+    #[legacy_exports]
     mod inst;
 }
 
 /// Operations and constants for `u64`
 #[path = "uint-template"]
 mod u64 {
+    #[legacy_exports];
     #[path = "u64.rs"]
+    #[legacy_exports]
     mod inst;
 }
 
 
+#[legacy_exports]
 mod box;
+#[legacy_exports]
 mod char;
+#[legacy_exports]
 mod float;
+#[legacy_exports]
 mod f32;
+#[legacy_exports]
 mod f64;
+#[legacy_exports]
 mod str;
+#[legacy_exports]
 mod ptr;
+#[legacy_exports]
 mod vec;
+#[legacy_exports]
 mod at_vec;
+#[legacy_exports]
 mod bool;
+#[legacy_exports]
 mod tuple;
+#[legacy_exports]
 mod unit;
+#[legacy_exports]
 mod uniq;
 
 // Ubiquitous-utility-type modules
 
 #[cfg(notest)]
+#[legacy_exports]
 mod ops;
+#[legacy_exports]
 mod cmp;
+#[legacy_exports]
 mod num;
+#[legacy_exports]
 mod hash;
+#[legacy_exports]
 mod either;
+#[legacy_exports]
 mod iter;
+#[legacy_exports]
 mod logging;
+#[legacy_exports]
 mod option;
 #[path="iter-trait"]
 mod option_iter {
+    #[legacy_exports];
     #[path = "option.rs"]
+    #[legacy_exports]
     mod inst;
 }
+#[legacy_exports]
 mod result;
+#[legacy_exports]
 mod to_str;
+#[legacy_exports]
 mod to_bytes;
+#[legacy_exports]
 mod from_str;
+#[legacy_exports]
 mod util;
 
 // Data structure modules
 
+#[legacy_exports]
 mod dvec;
 #[path="iter-trait"]
 mod dvec_iter {
+    #[legacy_exports];
     #[path = "dvec.rs"]
+    #[legacy_exports]
     mod inst;
 }
+#[legacy_exports]
 mod dlist;
 #[path="iter-trait"]
 mod dlist_iter {
+    #[legacy_exports];
     #[path ="dlist.rs"]
+    #[legacy_exports]
     mod inst;
 }
+#[legacy_exports]
 mod send_map;
 
 // Concurrency
+#[legacy_exports]
 mod comm;
+#[legacy_exports]
 mod task {
+    #[legacy_exports];
+    #[legacy_exports]
     mod local_data;
+    #[legacy_exports]
     mod local_data_priv;
+    #[legacy_exports]
     mod spawn;
+    #[legacy_exports]
     mod rt;
 }
+#[legacy_exports]
 mod future;
+#[legacy_exports]
 mod pipes;
 
 // Runtime and language-primitive support
 
+#[legacy_exports]
 mod gc;
+#[legacy_exports]
 mod io;
+#[legacy_exports]
 mod libc;
+#[legacy_exports]
 mod os;
+#[legacy_exports]
 mod path;
+#[legacy_exports]
 mod rand;
+#[legacy_exports]
 mod run;
+#[legacy_exports]
 mod sys;
+#[legacy_exports]
 mod cast;
+#[legacy_exports]
 mod mutable;
+#[legacy_exports]
 mod flate;
+#[legacy_exports]
 mod repr;
+#[legacy_exports]
 mod cleanup;
+#[legacy_exports]
 mod reflect;
 
 // Modules supporting compiler-generated code
 // Exported but not part of the public interface
 
+#[legacy_exports]
 mod extfmt;
 // The test harness links against core, so don't include runtime in tests.
 #[cfg(notest)]
+#[legacy_exports]
 mod rt;
 
 
 // For internal use, not exported
 
+#[legacy_exports]
 mod unicode;
+#[legacy_exports]
 mod private;
+#[legacy_exports]
 mod cmath;
+#[legacy_exports]
 mod stackwalk;
 
 // Local Variables:
diff --git a/src/libcore/core.rs b/src/libcore/core.rs
index a7c3c2555ac..8806131c9fb 100644
--- a/src/libcore/core.rs
+++ b/src/libcore/core.rs
@@ -2,6 +2,8 @@
 
 // Export various ubiquitous types, constructors, methods.
 
+#[legacy_exports];
+
 use option::{Some, None};
 use Option = option::Option;
 use result::{Result, Ok, Err};
@@ -84,6 +86,7 @@ const debug : u32 = 3_u32;
 // can be resolved within libcore.
 #[doc(hidden)] // FIXME #3538
 mod core {
+    #[legacy_exports];
     const error : u32 = 0_u32;
     const warn : u32 = 1_u32;
     const info : u32 = 2_u32;
@@ -93,6 +96,7 @@ mod core {
 // Similar to above. Some magic to make core testable.
 #[cfg(test)]
 mod std {
+    #[legacy_exports];
     extern mod std(vers = "0.4");
     use std::test;
 }
diff --git a/src/libcore/dlist.rs b/src/libcore/dlist.rs
index 7f4a42db641..5383eaa0d05 100644
--- a/src/libcore/dlist.rs
+++ b/src/libcore/dlist.rs
@@ -452,6 +452,7 @@ impl<T: Copy> DList<T> {
 
 #[cfg(test)]
 mod tests {
+    #[legacy_exports];
     #[test]
     fn test_dlist_concat() {
         let a = from_vec(~[1,2]);
diff --git a/src/libcore/extfmt.rs b/src/libcore/extfmt.rs
index 574014ff4b9..244fc637aa2 100644
--- a/src/libcore/extfmt.rs
+++ b/src/libcore/extfmt.rs
@@ -42,6 +42,7 @@ use option::{Some, None};
 
 // Functions used by the fmt extension at compile time
 mod ct {
+    #[legacy_exports];
     enum Signedness { Signed, Unsigned, }
     enum Caseness { CaseUpper, CaseLower, }
     enum Ty {
@@ -273,6 +274,7 @@ mod ct {
 // conditions can be evaluated at compile-time. For now though it's cleaner to
 // implement it 0this way, I think.
 mod rt {
+    #[legacy_exports];
     const flag_none : u32 = 0u32;
     const flag_left_justify   : u32 = 0b00000000000000000000000000000001u32;
     const flag_left_zero_pad  : u32 = 0b00000000000000000000000000000010u32;
@@ -479,6 +481,7 @@ mod rt {
 
 // XXX remove after snapshots
 mod rt2 {
+    #[legacy_exports];
     const flag_none : u32 = 0u32;
     const flag_left_justify   : u32 = 0b00000000000000000000000000000001u32;
     const flag_left_zero_pad  : u32 = 0b00000000000000000000000000000010u32;
@@ -685,6 +688,7 @@ mod rt2 {
 
 #[cfg(test)]
 mod test {
+    #[legacy_exports];
     #[test]
     fn fmt_slice() {
         let s = "abc";
diff --git a/src/libcore/f32.rs b/src/libcore/f32.rs
index f7376ab5df4..a8ca15f6afc 100644
--- a/src/libcore/f32.rs
+++ b/src/libcore/f32.rs
@@ -105,6 +105,7 @@ pure fn is_finite(x: f32) -> bool {
 
 /* Module: consts */
 mod consts {
+    #[legacy_exports];
 
     // FIXME (requires Issue #1433 to fix): replace with mathematical
     // constants from cmath.
diff --git a/src/libcore/f64.rs b/src/libcore/f64.rs
index 33b228ba345..0be0a059132 100644
--- a/src/libcore/f64.rs
+++ b/src/libcore/f64.rs
@@ -132,6 +132,7 @@ pure fn is_finite(x: f64) -> bool {
 
 /* Module: consts */
 mod consts {
+    #[legacy_exports];
 
     // FIXME (requires Issue #1433 to fix): replace with mathematical
     // constants from cmath.
diff --git a/src/libcore/flate.rs b/src/libcore/flate.rs
index a14b2997f0b..b75894e0c1b 100644
--- a/src/libcore/flate.rs
+++ b/src/libcore/flate.rs
@@ -11,6 +11,7 @@ Simple compression
 use libc::{c_void, size_t, c_int};
 
 extern mod rustrt {
+    #[legacy_exports];
 
     fn tdefl_compress_mem_to_heap(psrc_buf: *const c_void,
                                   src_buf_len: size_t,
diff --git a/src/libcore/float.rs b/src/libcore/float.rs
index 4877e12204a..df28426dc3a 100644
--- a/src/libcore/float.rs
+++ b/src/libcore/float.rs
@@ -52,6 +52,7 @@ const neg_infinity: float = -1.0/0.0;
 
 /* Module: consts */
 mod consts {
+    #[legacy_exports];
 
     // FIXME (requires Issue #1433 to fix): replace with mathematical
     // constants from cmath.
diff --git a/src/libcore/future.rs b/src/libcore/future.rs
index 5cd8dd237e0..35b3ffe040c 100644
--- a/src/libcore/future.rs
+++ b/src/libcore/future.rs
@@ -180,6 +180,7 @@ proto! future_pipe (
 
 #[allow(non_implicitly_copyable_typarams)]
 mod test {
+    #[legacy_exports];
     #[test]
     fn test_from_value() {
         let f = from_value(~"snail");
diff --git a/src/libcore/gc.rs b/src/libcore/gc.rs
index c700a387ca8..959e13ac7e1 100644
--- a/src/libcore/gc.rs
+++ b/src/libcore/gc.rs
@@ -47,6 +47,7 @@ struct StackSegment {
 }
 
 extern mod rustrt {
+    #[legacy_exports];
     fn rust_annihilate_box(ptr: *Word);
 
     #[rust_stack]
diff --git a/src/libcore/io.rs b/src/libcore/io.rs
index fab125c8d68..4ce9808dd94 100644
--- a/src/libcore/io.rs
+++ b/src/libcore/io.rs
@@ -17,6 +17,7 @@ type fd_t = c_int;
 
 #[abi = "cdecl"]
 extern mod rustrt {
+    #[legacy_exports];
     fn rust_get_stdin() -> *libc::FILE;
     fn rust_get_stdout() -> *libc::FILE;
     fn rust_get_stderr() -> *libc::FILE;
@@ -781,6 +782,7 @@ fn read_whole_file(file: &Path) -> Result<~[u8], ~str> {
 // fsync related
 
 mod fsync {
+    #[legacy_exports];
 
     enum Level {
         // whatever fsync does on that platform
@@ -863,6 +865,7 @@ mod fsync {
 
 #[cfg(test)]
 mod tests {
+    #[legacy_exports];
 
     #[test]
     fn test_simple() {
diff --git a/src/libcore/libc.rs b/src/libcore/libc.rs
index 491fe02ec31..f99bc455466 100644
--- a/src/libcore/libc.rs
+++ b/src/libcore/libc.rs
@@ -131,18 +131,22 @@ export access, chdir, close, dup, dup2, execv, execve, execvp, getcwd,
 
 
 mod types {
+    #[legacy_exports];
 
     // Types tend to vary *per architecture* so we pull their definitions out
     // into this module.
 
     // Standard types that are opaque or common, so are not per-target.
     mod common {
+        #[legacy_exports];
         mod c95 {
+            #[legacy_exports];
             enum c_void {}
             enum FILE {}
             enum fpos_t {}
         }
         mod c99 {
+            #[legacy_exports];
             type int8_t = i8;
             type int16_t = i16;
             type int32_t = i32;
@@ -153,21 +157,28 @@ mod types {
             type uint64_t = u64;
         }
         mod posix88 {
+            #[legacy_exports];
             enum DIR {}
             enum dirent {}
         }
-        mod posix01 { }
-        mod posix08 { }
-        mod bsd44 { }
+        mod posix01 {
+            #[legacy_exports]; }
+        mod posix08 {
+            #[legacy_exports]; }
+        mod bsd44 {
+            #[legacy_exports]; }
     }
 
     // Standard types that are scalar but vary by OS and arch.
 
     #[cfg(target_os = "linux")]
     mod os {
+        #[legacy_exports];
         #[cfg(target_arch = "x86")]
         mod arch {
+            #[legacy_exports];
             mod c95 {
+                #[legacy_exports];
                 type c_char = i8;
                 type c_schar = i8;
                 type c_uchar = u8;
@@ -186,12 +197,14 @@ mod types {
                 type wchar_t = i32;
             }
             mod c99 {
+                #[legacy_exports];
                 type c_longlong = i64;
                 type c_ulonglong = u64;
                 type intptr_t = int;
                 type uintptr_t = uint;
             }
             mod posix88 {
+                #[legacy_exports];
                 type off_t = i32;
                 type dev_t = u64;
                 type ino_t = u32;
@@ -202,16 +215,22 @@ mod types {
                 type mode_t = u32;
                 type ssize_t = i32;
             }
-            mod posix01 { }
-            mod posix08 { }
-            mod bsd44 { }
+            mod posix01 {
+                #[legacy_exports]; }
+            mod posix08 {
+                #[legacy_exports]; }
+            mod bsd44 {
+                #[legacy_exports]; }
             mod extra {
+                #[legacy_exports];
             }
         }
 
         #[cfg(target_arch = "x86_64")]
         mod arch {
+            #[legacy_exports];
             mod c95 {
+                #[legacy_exports];
                 type c_char = i8;
                 type c_schar = i8;
                 type c_uchar = u8;
@@ -230,12 +249,14 @@ mod types {
                 type wchar_t = i32;
             }
             mod c99 {
+                #[legacy_exports];
                 type c_longlong = i64;
                 type c_ulonglong = u64;
                 type intptr_t = int;
                 type uintptr_t = uint;
             }
             mod posix88 {
+                #[legacy_exports];
                 type off_t = i64;
                 type dev_t = u64;
                 type ino_t = u64;
@@ -246,19 +267,26 @@ mod types {
                 type mode_t = u32;
                 type ssize_t = i64;
             }
-            mod posix01 { }
-            mod posix08 { }
-            mod bsd44 { }
+            mod posix01 {
+                #[legacy_exports]; }
+            mod posix08 {
+                #[legacy_exports]; }
+            mod bsd44 {
+                #[legacy_exports]; }
             mod extra {
+                #[legacy_exports];
             }
         }
     }
 
     #[cfg(target_os = "freebsd")]
     mod os {
+        #[legacy_exports];
         #[cfg(target_arch = "x86_64")]
         mod arch {
+            #[legacy_exports];
             mod c95 {
+                #[legacy_exports];
                 type c_char = i8;
                 type c_schar = i8;
                 type c_uchar = u8;
@@ -277,12 +305,14 @@ mod types {
                 type wchar_t = i32;
             }
             mod c99 {
+                #[legacy_exports];
                 type c_longlong = i64;
                 type c_ulonglong = u64;
                 type intptr_t = int;
                 type uintptr_t = uint;
             }
             mod posix88 {
+                #[legacy_exports];
                 type off_t = i64;
                 type dev_t = u32;
                 type ino_t = u32;
@@ -293,19 +323,26 @@ mod types {
                 type mode_t = u16;
                 type ssize_t = i64;
             }
-            mod posix01 { }
-            mod posix08 { }
-            mod bsd44 { }
+            mod posix01 {
+                #[legacy_exports]; }
+            mod posix08 {
+                #[legacy_exports]; }
+            mod bsd44 {
+                #[legacy_exports]; }
             mod extra {
+                #[legacy_exports];
             }
         }
     }
 
     #[cfg(target_os = "win32")]
     mod os {
+        #[legacy_exports];
         #[cfg(target_arch = "x86")]
         mod arch {
+            #[legacy_exports];
             mod c95 {
+                #[legacy_exports];
                 type c_char = i8;
                 type c_schar = i8;
                 type c_uchar = u8;
@@ -324,12 +361,14 @@ mod types {
                 type wchar_t = u16;
             }
             mod c99 {
+                #[legacy_exports];
                 type c_longlong = i64;
                 type c_ulonglong = u64;
                 type intptr_t = int;
                 type uintptr_t = uint;
             }
             mod posix88 {
+                #[legacy_exports];
                 type off_t = i32;
                 type dev_t = u32;
                 type ino_t = i16;
@@ -338,10 +377,14 @@ mod types {
                 type mode_t = u16;
                 type ssize_t = i32;
             }
-            mod posix01 { }
-            mod posix08 { }
-            mod bsd44 { }
+            mod posix01 {
+                #[legacy_exports]; }
+            mod posix08 {
+                #[legacy_exports]; }
+            mod bsd44 {
+                #[legacy_exports]; }
             mod extra {
+                #[legacy_exports];
                 type BOOL = c_int;
                 type BYTE = u8;
                 type CCHAR = c_char;
@@ -377,9 +420,12 @@ mod types {
 
     #[cfg(target_os = "macos")]
     mod os {
+        #[legacy_exports];
         #[cfg(target_arch = "x86")]
         mod arch {
+            #[legacy_exports];
             mod c95 {
+                #[legacy_exports];
                 type c_char = i8;
                 type c_schar = i8;
                 type c_uchar = u8;
@@ -398,12 +444,14 @@ mod types {
                 type wchar_t = i32;
             }
             mod c99 {
+                #[legacy_exports];
                 type c_longlong = i64;
                 type c_ulonglong = u64;
                 type intptr_t = int;
                 type uintptr_t = uint;
             }
             mod posix88 {
+                #[legacy_exports];
                 type off_t = i64;
                 type dev_t = i32;
                 type ino_t = u64;
@@ -414,16 +462,22 @@ mod types {
                 type mode_t = u16;
                 type ssize_t = i32;
             }
-            mod posix01 { }
-            mod posix08 { }
-            mod bsd44 { }
+            mod posix01 {
+                #[legacy_exports]; }
+            mod posix08 {
+                #[legacy_exports]; }
+            mod bsd44 {
+                #[legacy_exports]; }
             mod extra {
+                #[legacy_exports];
             }
         }
 
         #[cfg(target_arch = "x86_64")]
         mod arch {
+            #[legacy_exports];
             mod c95 {
+                #[legacy_exports];
                 type c_char = i8;
                 type c_schar = i8;
                 type c_uchar = u8;
@@ -442,12 +496,14 @@ mod types {
                 type wchar_t = i32;
             }
             mod c99 {
+                #[legacy_exports];
                 type c_longlong = i64;
                 type c_ulonglong = u64;
                 type intptr_t = int;
                 type uintptr_t = uint;
             }
             mod posix88 {
+                #[legacy_exports];
                 type off_t = i64;
                 type dev_t = i32;
                 type ino_t = u64;
@@ -458,23 +514,30 @@ mod types {
                 type mode_t = u16;
                 type ssize_t = i64;
             }
-            mod posix01 { }
-            mod posix08 { }
-            mod bsd44 { }
+            mod posix01 {
+                #[legacy_exports]; }
+            mod posix08 {
+                #[legacy_exports]; }
+            mod bsd44 {
+                #[legacy_exports]; }
             mod extra {
+                #[legacy_exports];
             }
         }
     }
 }
 
 mod consts {
+    #[legacy_exports];
 
     // Consts tend to vary per OS so we pull their definitions out
     // into this module.
 
     #[cfg(target_os = "win32")]
     mod os {
+        #[legacy_exports];
         mod c95 {
+            #[legacy_exports];
             const EXIT_FAILURE : int = 1;
             const EXIT_SUCCESS : int = 0;
             const RAND_MAX : int = 32767;
@@ -491,8 +554,10 @@ mod consts {
             const L_tmpnam : uint = 16_u;
             const TMP_MAX : uint = 32767_u;
         }
-        mod c99 { }
+        mod c99 {
+            #[legacy_exports]; }
         mod posix88 {
+            #[legacy_exports];
             const O_RDONLY : int = 0;
             const O_WRONLY : int = 1;
             const O_RDWR : int = 2;
@@ -521,10 +586,14 @@ mod consts {
             const STDOUT_FILENO : int = 1;
             const STDERR_FILENO : int = 2;
         }
-        mod posix01 { }
-        mod posix08 { }
-        mod bsd44 { }
+        mod posix01 {
+            #[legacy_exports]; }
+        mod posix08 {
+            #[legacy_exports]; }
+        mod bsd44 {
+            #[legacy_exports]; }
         mod extra {
+            #[legacy_exports];
             const O_TEXT : int = 16384;
             const O_BINARY : int = 32768;
             const O_NOINHERIT: int = 128;
@@ -537,7 +606,9 @@ mod consts {
 
     #[cfg(target_os = "linux")]
     mod os {
+        #[legacy_exports];
         mod c95 {
+            #[legacy_exports];
             const EXIT_FAILURE : int = 1;
             const EXIT_SUCCESS : int = 0;
             const RAND_MAX : int = 2147483647;
@@ -554,8 +625,10 @@ mod consts {
             const L_tmpnam : uint = 20_u;
             const TMP_MAX : uint = 238328_u;
         }
-        mod c99 { }
+        mod c99 {
+            #[legacy_exports]; }
         mod posix88 {
+            #[legacy_exports];
             const O_RDONLY : int = 0;
             const O_WRONLY : int = 1;
             const O_RDWR : int = 2;
@@ -588,10 +661,14 @@ mod consts {
             const F_TLOCK : int = 2;
             const F_ULOCK : int = 0;
         }
-        mod posix01 { }
-        mod posix08 { }
-        mod bsd44 { }
+        mod posix01 {
+            #[legacy_exports]; }
+        mod posix08 {
+            #[legacy_exports]; }
+        mod bsd44 {
+            #[legacy_exports]; }
         mod extra {
+            #[legacy_exports];
             const O_RSYNC : int = 1052672;
             const O_DSYNC : int = 4096;
             const O_SYNC : int = 1052672;
@@ -600,7 +677,9 @@ mod consts {
 
     #[cfg(target_os = "freebsd")]
     mod os {
+        #[legacy_exports];
         mod c95 {
+            #[legacy_exports];
             const EXIT_FAILURE : int = 1;
             const EXIT_SUCCESS : int = 0;
             const RAND_MAX : int = 2147483647;
@@ -617,8 +696,10 @@ mod consts {
             const L_tmpnam : uint = 1024_u;
             const TMP_MAX : uint = 308915776_u;
         }
-        mod c99 { }
+        mod c99 {
+            #[legacy_exports]; }
         mod posix88 {
+            #[legacy_exports];
             const O_RDONLY : int = 0;
             const O_WRONLY : int = 1;
             const O_RDWR : int = 2;
@@ -651,10 +732,14 @@ mod consts {
             const F_TLOCK : int = 2;
             const F_ULOCK : int = 0;
         }
-        mod posix01 { }
-        mod posix08 { }
-        mod bsd44 { }
+        mod posix01 {
+            #[legacy_exports]; }
+        mod posix08 {
+            #[legacy_exports]; }
+        mod bsd44 {
+            #[legacy_exports]; }
         mod extra {
+            #[legacy_exports];
             const O_SYNC : int = 128;
             const CTL_KERN: int = 1;
             const KERN_PROC: int = 14;
@@ -664,7 +749,9 @@ mod consts {
 
     #[cfg(target_os = "macos")]
     mod os {
+        #[legacy_exports];
         mod c95 {
+            #[legacy_exports];
             const EXIT_FAILURE : int = 1;
             const EXIT_SUCCESS : int = 0;
             const RAND_MAX : int = 2147483647;
@@ -681,8 +768,10 @@ mod consts {
             const L_tmpnam : uint = 1024_u;
             const TMP_MAX : uint = 308915776_u;
         }
-        mod c99 { }
+        mod c99 {
+            #[legacy_exports]; }
         mod posix88 {
+            #[legacy_exports];
             const O_RDONLY : int = 0;
             const O_WRONLY : int = 1;
             const O_RDWR : int = 2;
@@ -715,10 +804,14 @@ mod consts {
             const F_TLOCK : int = 2;
             const F_ULOCK : int = 0;
         }
-        mod posix01 { }
-        mod posix08 { }
-        mod bsd44 { }
+        mod posix01 {
+            #[legacy_exports]; }
+        mod posix08 {
+            #[legacy_exports]; }
+        mod bsd44 {
+            #[legacy_exports]; }
         mod extra {
+            #[legacy_exports];
             const O_DSYNC : int = 4194304;
             const O_SYNC : int = 128;
             const F_FULLFSYNC : int = 51;
@@ -728,15 +821,18 @@ mod consts {
 
 
 mod funcs {
+    #[legacy_exports];
 
     // Thankfull most of c95 is universally available and does not vary by OS
     // or anything. The same is not true of POSIX.
 
     mod c95 {
+        #[legacy_exports];
 
         #[nolink]
         #[abi = "cdecl"]
         extern mod ctype {
+            #[legacy_exports];
             fn isalnum(c: c_int) -> c_int;
             fn isalpha(c: c_int) -> c_int;
             fn iscntrl(c: c_int) -> c_int;
@@ -755,6 +851,7 @@ mod funcs {
         #[nolink]
         #[abi = "cdecl"]
         extern mod stdio {
+            #[legacy_exports];
 
             fn fopen(filename: *c_char, mode: *c_char) -> *FILE;
             fn freopen(filename: *c_char, mode: *c_char,
@@ -799,6 +896,7 @@ mod funcs {
         #[nolink]
         #[abi = "cdecl"]
         extern mod stdlib {
+            #[legacy_exports];
             fn abs(i: c_int) -> c_int;
             fn labs(i: c_long) -> c_long;
             // Omitted: div, ldiv (return type incomplete).
@@ -824,6 +922,7 @@ mod funcs {
         #[nolink]
         #[abi = "cdecl"]
         extern mod string {
+            #[legacy_exports];
 
             fn strcpy(dst: *c_char, src: *c_char) -> *c_char;
             fn strncpy(dst: *c_char, src: *c_char, n: size_t) -> *c_char;
@@ -858,10 +957,12 @@ mod funcs {
 
     #[cfg(target_os = "win32")]
     mod posix88 {
+        #[legacy_exports];
 
         #[nolink]
         #[abi = "cdecl"]
         extern mod stat {
+            #[legacy_exports];
             #[link_name = "_chmod"]
             fn chmod(path: *c_char, mode: c_int) -> c_int;
 
@@ -872,6 +973,7 @@ mod funcs {
         #[nolink]
         #[abi = "cdecl"]
         extern mod stdio {
+            #[legacy_exports];
             #[link_name = "_popen"]
             fn popen(command: *c_char, mode: *c_char) -> *FILE;
 
@@ -888,6 +990,7 @@ mod funcs {
         #[nolink]
         #[abi = "cdecl"]
         extern mod fcntl {
+            #[legacy_exports];
             #[link_name = "_open"]
             fn open(path: *c_char, oflag: c_int, mode: c_int) -> c_int;
 
@@ -898,12 +1001,14 @@ mod funcs {
         #[nolink]
         #[abi = "cdecl"]
         extern mod dirent {
+            #[legacy_exports];
             // Not supplied at all.
         }
 
         #[nolink]
         #[abi = "cdecl"]
         extern mod unistd {
+            #[legacy_exports];
             #[link_name = "_access"]
             fn access(path: *c_char, amode: c_int) -> c_int;
 
@@ -968,10 +1073,12 @@ mod funcs {
     #[cfg(target_os = "macos")]
     #[cfg(target_os = "freebsd")]
     mod posix88 {
+        #[legacy_exports];
 
         #[nolink]
         #[abi = "cdecl"]
         extern mod stat {
+            #[legacy_exports];
             fn chmod(path: *c_char, mode: mode_t) -> c_int;
             fn fchmod(fd: c_int, mode: mode_t) -> c_int;
             fn mkdir(path: *c_char, mode: mode_t) -> c_int;
@@ -981,6 +1088,7 @@ mod funcs {
         #[nolink]
         #[abi = "cdecl"]
         extern mod stdio {
+            #[legacy_exports];
             fn popen(command: *c_char, mode: *c_char) -> *FILE;
             fn pclose(stream: *FILE) -> c_int;
             fn fdopen(fd: c_int, mode: *c_char) -> *FILE;
@@ -990,6 +1098,7 @@ mod funcs {
         #[nolink]
         #[abi = "cdecl"]
         extern mod fcntl {
+            #[legacy_exports];
             fn open(path: *c_char, oflag: c_int, mode: c_int) -> c_int;
             fn creat(path: *c_char, mode: mode_t) -> c_int;
             fn fcntl(fd: c_int, cmd: c_int) -> c_int;
@@ -998,6 +1107,7 @@ mod funcs {
         #[nolink]
         #[abi = "cdecl"]
         extern mod dirent {
+            #[legacy_exports];
             fn opendir(dirname: *c_char) -> *DIR;
             fn closedir(dirp: *DIR) -> c_int;
             fn readdir(dirp: *DIR) -> *dirent;
@@ -1009,6 +1119,7 @@ mod funcs {
         #[nolink]
         #[abi = "cdecl"]
         extern mod unistd {
+            #[legacy_exports];
             fn access(path: *c_char, amode: c_int) -> c_int;
             fn alarm(seconds: c_uint) -> c_uint;
             fn chdir(dir: *c_char) -> c_int;
@@ -1058,10 +1169,12 @@ mod funcs {
     #[cfg(target_os = "macos")]
     #[cfg(target_os = "freebsd")]
     mod posix01 {
+        #[legacy_exports];
 
         #[nolink]
         #[abi = "cdecl"]
         extern mod unistd {
+            #[legacy_exports];
             fn readlink(path: *c_char, buf: *mut c_char,
                         bufsz: size_t) -> ssize_t;
 
@@ -1079,6 +1192,7 @@ mod funcs {
         #[nolink]
         #[abi = "cdecl"]
         extern mod wait {
+            #[legacy_exports];
             fn waitpid(pid: pid_t, status: *mut c_int,
                        options: c_int) -> pid_t;
         }
@@ -1086,8 +1200,10 @@ mod funcs {
 
     #[cfg(target_os = "win32")]
     mod posix01 {
+        #[legacy_exports];
         #[nolink]
-        extern mod unistd { }
+        extern mod unistd {
+            #[legacy_exports]; }
     }
 
 
@@ -1096,8 +1212,10 @@ mod funcs {
     #[cfg(target_os = "macos")]
     #[cfg(target_os = "freebsd")]
     mod posix08 {
+        #[legacy_exports];
         #[nolink]
-        extern mod unistd { }
+        extern mod unistd {
+            #[legacy_exports]; }
     }
 
 
@@ -1106,6 +1224,7 @@ mod funcs {
     #[nolink]
     #[abi = "cdecl"]
     extern mod bsd44 {
+        #[legacy_exports];
 
         fn sysctl(name: *c_int, namelen: c_uint,
                   oldp: *mut c_void, oldlenp: *mut size_t,
@@ -1123,6 +1242,7 @@ mod funcs {
     #[cfg(target_os = "linux")]
     #[cfg(target_os = "win32")]
     mod bsd44 {
+        #[legacy_exports];
     }
 
 
@@ -1130,23 +1250,28 @@ mod funcs {
     #[nolink]
     #[abi = "cdecl"]
     extern mod extra {
+        #[legacy_exports];
         fn _NSGetExecutablePath(buf: *mut c_char,
                                 bufsize: *mut u32) -> c_int;
     }
 
     #[cfg(target_os = "freebsd")]
-    mod extra { }
+    mod extra {
+        #[legacy_exports]; }
 
     #[cfg(target_os = "linux")]
-    mod extra { }
+    mod extra {
+        #[legacy_exports]; }
 
 
     #[cfg(target_os = "win32")]
     mod extra {
+        #[legacy_exports];
         use types::os::arch::extra::*;
 
         #[abi = "stdcall"]
         extern mod kernel32 {
+            #[legacy_exports];
             fn GetEnvironmentVariableW(n: LPCWSTR,
                                        v: LPWSTR,
                                        nsize: DWORD) -> DWORD;
@@ -1171,6 +1296,7 @@ mod funcs {
         #[abi = "cdecl"]
         #[nolink]
         extern mod msvcrt {
+            #[legacy_exports];
             #[link_name = "_commit"]
             fn commit(fd: c_int) -> c_int;
         }
diff --git a/src/libcore/logging.rs b/src/libcore/logging.rs
index bb951c76597..6086b2edd7e 100644
--- a/src/libcore/logging.rs
+++ b/src/libcore/logging.rs
@@ -8,6 +8,7 @@ export console_on, console_off;
 
 #[nolink]
 extern mod rustrt {
+    #[legacy_exports];
     fn rust_log_console_on();
     fn rust_log_console_off();
 }
diff --git a/src/libcore/os.rs b/src/libcore/os.rs
index 21a6a06572a..5c8d478932a 100644
--- a/src/libcore/os.rs
+++ b/src/libcore/os.rs
@@ -44,6 +44,7 @@ export walk_dir;
 export as_c_charp, fill_charp_buf;
 
 extern mod rustrt {
+    #[legacy_exports];
     fn rust_getcwd() -> ~str;
     fn rust_path_is_dir(path: *libc::c_char) -> c_int;
     fn rust_path_exists(path: *libc::c_char) -> c_int;
@@ -78,6 +79,7 @@ fn fill_charp_buf(f: fn(*mut c_char, size_t) -> bool)
 
 #[cfg(windows)]
 mod win32 {
+    #[legacy_exports];
     use dword = libc::types::os::arch::extra::DWORD;
 
     fn fill_utf16_buf_and_decode(f: fn(*mut u16, dword) -> dword)
@@ -131,6 +133,7 @@ fn env() -> ~[(~str,~str)] {
 }
 
 mod global_env {
+    #[legacy_exports];
     //! Internal module for serializing access to getenv/setenv
 
     export getenv;
@@ -138,6 +141,7 @@ mod global_env {
     export env;
 
     extern mod rustrt {
+        #[legacy_exports];
         fn rust_global_env_chan_ptr() -> *libc::uintptr_t;
     }
 
@@ -204,7 +208,9 @@ mod global_env {
     }
 
     mod impl_ {
+        #[legacy_exports];
         extern mod rustrt {
+            #[legacy_exports];
             fn rust_env_pairs() -> ~[~str];
         }
 
@@ -791,6 +797,7 @@ fn family() -> ~str { ~"windows" }
 
 #[cfg(target_os = "macos")]
 mod consts {
+    #[legacy_exports];
     fn sysname() -> ~str { ~"macos" }
     fn exe_suffix() -> ~str { ~"" }
     fn dll_suffix() -> ~str { ~".dylib" }
@@ -798,6 +805,7 @@ mod consts {
 
 #[cfg(target_os = "freebsd")]
 mod consts {
+    #[legacy_exports];
     fn sysname() -> ~str { ~"freebsd" }
     fn exe_suffix() -> ~str { ~"" }
     fn dll_suffix() -> ~str { ~".so" }
@@ -805,6 +813,7 @@ mod consts {
 
 #[cfg(target_os = "linux")]
 mod consts {
+    #[legacy_exports];
     fn sysname() -> ~str { ~"linux" }
     fn exe_suffix() -> ~str { ~"" }
     fn dll_suffix() -> ~str { ~".so" }
@@ -812,6 +821,7 @@ mod consts {
 
 #[cfg(target_os = "win32")]
 mod consts {
+    #[legacy_exports];
     fn sysname() -> ~str { ~"win32" }
     fn exe_suffix() -> ~str { ~".exe" }
     fn dll_suffix() -> ~str { ~".dll" }
@@ -829,6 +839,7 @@ fn arch() -> str { ~"arm" }
 #[cfg(test)]
 #[allow(non_implicitly_copyable_typarams)]
 mod tests {
+    #[legacy_exports];
 
     #[test]
     fn last_os_error() {
diff --git a/src/libcore/path.rs b/src/libcore/path.rs
index 331ff57116a..49909208d75 100644
--- a/src/libcore/path.rs
+++ b/src/libcore/path.rs
@@ -484,6 +484,7 @@ fn test_double_slash_collapsing()
 }
 
 mod posix {
+    #[legacy_exports];
 
     #[cfg(test)]
     fn mk(s: &str) -> PosixPath { from_str::<PosixPath>(s) }
@@ -574,6 +575,7 @@ mod posix {
 
 // Various windows helpers, and tests for the impl.
 mod windows {
+    #[legacy_exports];
 
     #[inline(always)]
     pure fn is_sep(u: u8) -> bool {
diff --git a/src/libcore/pipes.rs b/src/libcore/pipes.rs
index 3d40358dcc1..5b977080573 100644
--- a/src/libcore/pipes.rs
+++ b/src/libcore/pipes.rs
@@ -268,6 +268,7 @@ fn entangle_buffer<T: Send, Tstart: Send>(
 #[abi = "rust-intrinsic"]
 #[doc(hidden)]
 extern mod rusti {
+    #[legacy_exports];
     fn atomic_xchg(dst: &mut int, src: int) -> int;
     fn atomic_xchg_acq(dst: &mut int, src: int) -> int;
     fn atomic_xchg_rel(dst: &mut int, src: int) -> int;
@@ -308,6 +309,7 @@ type rust_task = libc::c_void;
 
 #[doc(hidden)]
 extern mod rustrt {
+    #[legacy_exports];
     #[rust_stack]
     fn rust_get_task() -> *rust_task;
     #[rust_stack]
@@ -1224,6 +1226,7 @@ fn try_send_one<T: Send>(+chan: ChanOne<T>, +data: T)
 }
 
 mod rt {
+    #[legacy_exports];
     // These are used to hide the option constructors from the
     // compiler because their names are changing
     fn make_some<T>(+val: T) -> Option<T> { Some(move val) }
@@ -1232,6 +1235,7 @@ mod rt {
 
 #[cfg(test)]
 mod test {
+    #[legacy_exports];
     #[test]
     fn test_select2() {
         let (c1, p1) = pipes::stream();
diff --git a/src/libcore/private.rs b/src/libcore/private.rs
index a5db84a9b06..777aea7320c 100644
--- a/src/libcore/private.rs
+++ b/src/libcore/private.rs
@@ -16,6 +16,7 @@ use task::TaskBuilder;
 use task::atomically;
 
 extern mod rustrt {
+    #[legacy_exports];
     fn rust_task_weaken(ch: rust_port_id);
     fn rust_task_unweaken(ch: rust_port_id);
 
@@ -558,6 +559,7 @@ fn unwrap_exclusive<T: Send>(+arc: Exclusive<T>) -> T {
 
 #[cfg(test)]
 mod tests {
+    #[legacy_exports];
 
     #[test]
     fn exclusive_arc() {
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs
index 65cf61ab2bd..47a9f60afa5 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -27,6 +27,7 @@ use libc::{c_void, size_t};
 #[nolink]
 #[abi = "cdecl"]
 extern mod libc_ {
+    #[legacy_exports];
     #[rust_stack]
     fn memcpy(dest: *mut c_void, src: *const c_void,
               n: libc::size_t) -> *c_void;
@@ -42,6 +43,7 @@ extern mod libc_ {
 
 #[abi = "rust-intrinsic"]
 extern mod rusti {
+    #[legacy_exports];
     fn addr_of<T>(val: T) -> *T;
 }
 
diff --git a/src/libcore/rand.rs b/src/libcore/rand.rs
index 52b5bdadc35..1b9aba6e391 100644
--- a/src/libcore/rand.rs
+++ b/src/libcore/rand.rs
@@ -8,6 +8,7 @@ enum rctx {}
 
 #[abi = "cdecl"]
 extern mod rustrt {
+    #[legacy_exports];
     fn rand_seed() -> ~[u8];
     fn rand_new() -> *rctx;
     fn rand_new_seeded(seed: ~[u8]) -> *rctx;
@@ -309,6 +310,7 @@ fn seeded_xorshift(x: u32, y: u32, z: u32, w: u32) -> Rng {
 
 #[cfg(test)]
 mod tests {
+    #[legacy_exports];
 
     #[test]
     fn rng_seeded() {
diff --git a/src/libcore/result.rs b/src/libcore/result.rs
index 1b41c37273e..3396e3670c4 100644
--- a/src/libcore/result.rs
+++ b/src/libcore/result.rs
@@ -401,6 +401,7 @@ impl<T:Eq,U:Eq> Result<T,U> : Eq {
 #[cfg(test)]
 #[allow(non_implicitly_copyable_typarams)]
 mod tests {
+    #[legacy_exports];
     fn op1() -> result::Result<int, ~str> { result::Ok(666) }
 
     fn op2(&&i: int) -> result::Result<uint, ~str> {
diff --git a/src/libcore/rt.rs b/src/libcore/rt.rs
index f303c22ab42..644edb69d56 100644
--- a/src/libcore/rt.rs
+++ b/src/libcore/rt.rs
@@ -14,6 +14,7 @@ use gc::{cleanup_stack_for_failure, gc, Word};
 type rust_task = c_void;
 
 extern mod rustrt {
+    #[legacy_exports];
     #[rust_stack]
     fn rust_upcall_fail(expr: *c_char, file: *c_char, line: size_t);
 
diff --git a/src/libcore/run.rs b/src/libcore/run.rs
index 2eda9d53659..2496ad51a41 100644
--- a/src/libcore/run.rs
+++ b/src/libcore/run.rs
@@ -16,6 +16,7 @@ export waitpid;
 
 #[abi = "cdecl"]
 extern mod rustrt {
+    #[legacy_exports];
     fn rust_run_program(argv: **libc::c_char, envp: *c_void,
                         dir: *libc::c_char,
                         in_fd: c_int, out_fd: c_int, err_fd: c_int)
@@ -401,6 +402,7 @@ fn waitpid(pid: pid_t) -> int {
 
 #[cfg(test)]
 mod tests {
+    #[legacy_exports];
 
     use io::WriterUtil;
 
diff --git a/src/libcore/send_map.rs b/src/libcore/send_map.rs
index 5dfc1f64367..2a010ee4712 100644
--- a/src/libcore/send_map.rs
+++ b/src/libcore/send_map.rs
@@ -28,6 +28,7 @@ trait SendMap<K:Eq Hash, V: Copy> {
 
 /// Open addressing with linear probing.
 mod linear {
+    #[legacy_exports];
     export LinearMap, linear_map, linear_map_with_capacity, public_methods;
 
     const initial_capacity: uint = 32u; // 2^5
@@ -362,6 +363,7 @@ mod linear {
 
 #[test]
 mod test {
+    #[legacy_exports];
 
     use linear::LinearMap;
 
diff --git a/src/libcore/stackwalk.rs b/src/libcore/stackwalk.rs
index acea7f60eab..7c0a4ee8761 100644
--- a/src/libcore/stackwalk.rs
+++ b/src/libcore/stackwalk.rs
@@ -79,10 +79,12 @@ fn frame_address(f: fn(*u8)) {
 }
 
 extern mod rustrt {
+    #[legacy_exports];
     fn rust_dbg_breakpoint();
 }
 
 #[abi = "rust-intrinsic"]
 extern mod rusti {
+    #[legacy_exports];
     fn frame_address(f: fn(*u8));
 }
diff --git a/src/libcore/str.rs b/src/libcore/str.rs
index 479776d7fd5..35c2fde36b4 100644
--- a/src/libcore/str.rs
+++ b/src/libcore/str.rs
@@ -2040,6 +2040,7 @@ pure fn escape_unicode(s: &str) -> ~str {
 
 /// Unsafe operations
 mod raw {
+    #[legacy_exports];
    export
       from_buf,
       from_buf_len,
@@ -2233,6 +2234,7 @@ impl ~str: UniqueStr {
 
 #[cfg(notest)]
 mod traits {
+    #[legacy_exports];
     #[cfg(stage0)]
     impl ~str: Add<&str,~str> {
         #[inline(always)]
@@ -2251,7 +2253,8 @@ mod traits {
 }
 
 #[cfg(test)]
-mod traits {}
+mod traits {
+    #[legacy_exports];}
 
 trait StrSlice {
     fn all(it: fn(char) -> bool) -> bool;
@@ -2396,6 +2399,7 @@ impl &str: StrSlice {
 
 #[cfg(test)]
 mod tests {
+    #[legacy_exports];
 
     use libc::c_char;
 
diff --git a/src/libcore/sys.rs b/src/libcore/sys.rs
index a541e6de7c5..37403213ab2 100644
--- a/src/libcore/sys.rs
+++ b/src/libcore/sys.rs
@@ -38,6 +38,7 @@ struct Closure {
 
 #[abi = "rust-intrinsic"]
 extern mod rusti {
+    #[legacy_exports];
     fn get_tydesc<T>() -> *();
     fn size_of<T>() -> uint;
     fn pref_align_of<T>() -> uint;
@@ -111,6 +112,7 @@ pure fn log_str<T>(t: &T) -> ~str {
 
 #[cfg(test)]
 mod tests {
+    #[legacy_exports];
 
     #[test]
     fn size_of_basic() {
diff --git a/src/libcore/task.rs b/src/libcore/task.rs
index 52775456d10..baabd711456 100644
--- a/src/libcore/task.rs
+++ b/src/libcore/task.rs
@@ -1178,6 +1178,7 @@ fn test_spawn_sched_childs_on_same_sched() {
 #[nolink]
 #[cfg(test)]
 extern mod testrt {
+    #[legacy_exports];
     fn rust_dbg_lock_create() -> *libc::c_void;
     fn rust_dbg_lock_destroy(lock: *libc::c_void);
     fn rust_dbg_lock_lock(lock: *libc::c_void);
diff --git a/src/libcore/to_str.rs b/src/libcore/to_str.rs
index 65d9b0e4471..a9e7bd74b28 100644
--- a/src/libcore/to_str.rs
+++ b/src/libcore/to_str.rs
@@ -101,6 +101,7 @@ impl<A: ToStr> ~A: ToStr {
 #[cfg(test)]
 #[allow(non_implicitly_copyable_typarams)]
 mod tests {
+    #[legacy_exports];
     #[test]
     fn test_simple_types() {
         assert 1.to_str() == ~"1";
diff --git a/src/libcore/unicode.rs b/src/libcore/unicode.rs
index 2c115fcf444..ef26ae5d223 100644
--- a/src/libcore/unicode.rs
+++ b/src/libcore/unicode.rs
@@ -4,6 +4,7 @@
 #[forbid(deprecated_pattern)];
 
 mod general_category {
+    #[legacy_exports];
     pure fn Cc(c: char) -> bool {
         return match c {
               '\x00' .. '\x1f'
@@ -2564,6 +2565,7 @@ mod general_category {
 
 }
 mod derived_property {
+    #[legacy_exports];
     /// Check if a character has the alphabetic unicode property
     pure fn Alphabetic(c: char) -> bool {
         return match c {
diff --git a/src/libcore/util.rs b/src/libcore/util.rs
index e9ca27407ea..8c38949f5df 100644
--- a/src/libcore/util.rs
+++ b/src/libcore/util.rs
@@ -93,6 +93,7 @@ fn unreachable() -> ! {
 }
 
 mod tests {
+    #[legacy_exports];
     #[test]
     fn identity_crisis() {
         // Writing a test for the identity function. How did it come to this?
diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs
index c9f69e6b21f..c4b78f9b95f 100644
--- a/src/libcore/vec.rs
+++ b/src/libcore/vec.rs
@@ -97,6 +97,7 @@ export traits;
 
 #[abi = "cdecl"]
 extern mod rustrt {
+    #[legacy_exports];
     fn vec_reserve_shared(++t: *sys::TypeDesc,
                           ++v: **raw::VecRepr,
                           ++n: libc::size_t);
@@ -104,6 +105,7 @@ extern mod rustrt {
 
 #[abi = "rust-intrinsic"]
 extern mod rusti {
+    #[legacy_exports];
     fn move_val_init<T>(&dst: T, -src: T);
 }
 
@@ -1535,6 +1537,7 @@ impl<T: Ord> @[T] : Ord {
 
 #[cfg(notest)]
 mod traits {
+    #[legacy_exports];
     #[cfg(stage0)]
     impl<T: Copy> ~[T]: Add<&[const T],~[T]> {
         #[inline(always)]
@@ -1570,7 +1573,8 @@ mod traits {
 }
 
 #[cfg(test)]
-mod traits {}
+mod traits {
+    #[legacy_exports];}
 
 trait ConstVector {
     pure fn is_empty() -> bool;
@@ -1744,6 +1748,7 @@ impl<T: Copy> &[T]: ImmutableCopyableVector<T> {
 
 /// Unsafe operations
 mod raw {
+    #[legacy_exports];
     // FIXME: This should have crate visibility (#1893 blocks that)
 
     /// The internal representation of a (boxed) vector
@@ -1888,6 +1893,7 @@ mod raw {
 
 /// Operations on `[u8]`
 mod bytes {
+    #[legacy_exports];
     export cmp;
     export lt, le, eq, ne, ge, gt;
     export memcpy, memmove;
@@ -2017,6 +2023,7 @@ impl<A: Copy Ord> &[A]: iter::CopyableOrderedIter<A> {
 
 #[cfg(test)]
 mod tests {
+    #[legacy_exports];
 
     fn square(n: uint) -> uint { return n * n; }