diff --git a/src/libcore/core.rc b/src/libcore/core.rc index 8394db054ed3..7e2b20d547ed 100644 --- a/src/libcore/core.rc +++ b/src/libcore/core.rc @@ -307,13 +307,9 @@ mod gc; mod io; mod libc; mod os; -#[legacy_exports] mod path; -#[legacy_exports] mod rand; -#[legacy_exports] mod run; -#[legacy_exports] mod sys; #[legacy_exports] mod cast; diff --git a/src/libcore/path.rs b/src/libcore/path.rs index 505ecff2bcff..c384745bb5e5 100644 --- a/src/libcore/path.rs +++ b/src/libcore/path.rs @@ -10,19 +10,19 @@ Cross-platform file path handling use cmp::Eq; -struct WindowsPath { +pub struct WindowsPath { host: Option<~str>, device: Option<~str>, is_absolute: bool, components: ~[~str], } -struct PosixPath { +pub struct PosixPath { is_absolute: bool, components: ~[~str], } -trait GenericPath { +pub trait GenericPath { static pure fn from_str((&str)) -> self; @@ -45,18 +45,18 @@ trait GenericPath { } #[cfg(windows)] -type Path = WindowsPath; +pub type Path = WindowsPath; #[cfg(windows)] -pure fn Path(s: &str) -> Path { +pub pure fn Path(s: &str) -> Path { from_str::(s) } #[cfg(unix)] -type Path = PosixPath; +pub type Path = PosixPath; #[cfg(unix)] -pure fn Path(s: &str) -> Path { +pub pure fn Path(s: &str) -> Path { from_str::(s) } @@ -429,7 +429,7 @@ impl WindowsPath : GenericPath { } -pure fn normalize(components: &[~str]) -> ~[~str] { +pub pure fn normalize(components: &[~str]) -> ~[~str] { let mut cs = ~[]; unsafe { for components.each |c| { @@ -462,7 +462,6 @@ fn test_double_slash_collapsing() } mod posix { - #[legacy_exports]; #[cfg(test)] fn mk(s: &str) -> PosixPath { from_str::(s) } @@ -553,14 +552,13 @@ mod posix { // Various windows helpers, and tests for the impl. mod windows { - #[legacy_exports]; #[inline(always)] - pure fn is_sep(u: u8) -> bool { + pub pure fn is_sep(u: u8) -> bool { u == '/' as u8 || u == '\\' as u8 } - pure fn extract_unc_prefix(s: &str) -> Option<(~str,~str)> { + pub pure fn extract_unc_prefix(s: &str) -> Option<(~str,~str)> { if (s.len() > 1 && s[0] == '\\' as u8 && s[1] == '\\' as u8) { @@ -577,7 +575,7 @@ mod windows { None } - pure fn extract_drive_prefix(s: &str) -> Option<(~str,~str)> { + pub pure fn extract_drive_prefix(s: &str) -> Option<(~str,~str)> { unsafe { if (s.len() > 1 && libc::isalpha(s[0] as libc::c_int) != 0 && diff --git a/src/libcore/rand.rs b/src/libcore/rand.rs index c04c46d02e5c..73d2cc73c1cf 100644 --- a/src/libcore/rand.rs +++ b/src/libcore/rand.rs @@ -9,7 +9,6 @@ enum rctx {} #[abi = "cdecl"] extern mod rustrt { - #[legacy_exports]; fn rand_seed() -> ~[u8]; fn rand_new() -> *rctx; fn rand_new_seeded(seed: ~[u8]) -> *rctx; diff --git a/src/libcore/run.rs b/src/libcore/run.rs index abeff1bd1d6e..ae6a0bbb1dd5 100644 --- a/src/libcore/run.rs +++ b/src/libcore/run.rs @@ -9,7 +9,6 @@ use io::ReaderUtil; #[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) diff --git a/src/libcore/sys.rs b/src/libcore/sys.rs index d89691aba5b7..9f13a6c2207c 100644 --- a/src/libcore/sys.rs +++ b/src/libcore/sys.rs @@ -27,7 +27,6 @@ pub struct Closure { #[abi = "rust-intrinsic"] extern mod rusti { - #[legacy_exports]; fn get_tydesc() -> *(); fn size_of() -> uint; fn pref_align_of() -> uint;