Skip to content

Commit 8c89e4b

Browse files
committedSep 27, 2012
Finish de-exporting path, rand, run, sys. Part of #3583.
1 parent 3254bee commit 8c89e4b

File tree

5 files changed

+11
-20
lines changed

5 files changed

+11
-20
lines changed
 

Diff for: ‎src/libcore/core.rc

-4
Original file line numberDiff line numberDiff line change
@@ -307,13 +307,9 @@ mod gc;
307307
mod io;
308308
mod libc;
309309
mod os;
310-
#[legacy_exports]
311310
mod path;
312-
#[legacy_exports]
313311
mod rand;
314-
#[legacy_exports]
315312
mod run;
316-
#[legacy_exports]
317313
mod sys;
318314
#[legacy_exports]
319315
mod cast;

Diff for: ‎src/libcore/path.rs

+11-13
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ Cross-platform file path handling
1010

1111
use cmp::Eq;
1212

13-
struct WindowsPath {
13+
pub struct WindowsPath {
1414
host: Option<~str>,
1515
device: Option<~str>,
1616
is_absolute: bool,
1717
components: ~[~str],
1818
}
1919

20-
struct PosixPath {
20+
pub struct PosixPath {
2121
is_absolute: bool,
2222
components: ~[~str],
2323
}
2424

25-
trait GenericPath {
25+
pub trait GenericPath {
2626

2727
static pure fn from_str((&str)) -> self;
2828

@@ -45,18 +45,18 @@ trait GenericPath {
4545
}
4646

4747
#[cfg(windows)]
48-
type Path = WindowsPath;
48+
pub type Path = WindowsPath;
4949

5050
#[cfg(windows)]
51-
pure fn Path(s: &str) -> Path {
51+
pub pure fn Path(s: &str) -> Path {
5252
from_str::<WindowsPath>(s)
5353
}
5454

5555
#[cfg(unix)]
56-
type Path = PosixPath;
56+
pub type Path = PosixPath;
5757

5858
#[cfg(unix)]
59-
pure fn Path(s: &str) -> Path {
59+
pub pure fn Path(s: &str) -> Path {
6060
from_str::<PosixPath>(s)
6161
}
6262

@@ -429,7 +429,7 @@ impl WindowsPath : GenericPath {
429429
}
430430

431431

432-
pure fn normalize(components: &[~str]) -> ~[~str] {
432+
pub pure fn normalize(components: &[~str]) -> ~[~str] {
433433
let mut cs = ~[];
434434
unsafe {
435435
for components.each |c| {
@@ -462,7 +462,6 @@ fn test_double_slash_collapsing()
462462
}
463463

464464
mod posix {
465-
#[legacy_exports];
466465

467466
#[cfg(test)]
468467
fn mk(s: &str) -> PosixPath { from_str::<PosixPath>(s) }
@@ -553,14 +552,13 @@ mod posix {
553552

554553
// Various windows helpers, and tests for the impl.
555554
mod windows {
556-
#[legacy_exports];
557555

558556
#[inline(always)]
559-
pure fn is_sep(u: u8) -> bool {
557+
pub pure fn is_sep(u: u8) -> bool {
560558
u == '/' as u8 || u == '\\' as u8
561559
}
562560

563-
pure fn extract_unc_prefix(s: &str) -> Option<(~str,~str)> {
561+
pub pure fn extract_unc_prefix(s: &str) -> Option<(~str,~str)> {
564562
if (s.len() > 1 &&
565563
s[0] == '\\' as u8 &&
566564
s[1] == '\\' as u8) {
@@ -577,7 +575,7 @@ mod windows {
577575
None
578576
}
579577

580-
pure fn extract_drive_prefix(s: &str) -> Option<(~str,~str)> {
578+
pub pure fn extract_drive_prefix(s: &str) -> Option<(~str,~str)> {
581579
unsafe {
582580
if (s.len() > 1 &&
583581
libc::isalpha(s[0] as libc::c_int) != 0 &&

Diff for: ‎src/libcore/rand.rs

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ enum rctx {}
99

1010
#[abi = "cdecl"]
1111
extern mod rustrt {
12-
#[legacy_exports];
1312
fn rand_seed() -> ~[u8];
1413
fn rand_new() -> *rctx;
1514
fn rand_new_seeded(seed: ~[u8]) -> *rctx;

Diff for: ‎src/libcore/run.rs

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use io::ReaderUtil;
99

1010
#[abi = "cdecl"]
1111
extern mod rustrt {
12-
#[legacy_exports];
1312
fn rust_run_program(argv: **libc::c_char, envp: *c_void,
1413
dir: *libc::c_char,
1514
in_fd: c_int, out_fd: c_int, err_fd: c_int)

Diff for: ‎src/libcore/sys.rs

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ pub struct Closure {
2727

2828
#[abi = "rust-intrinsic"]
2929
extern mod rusti {
30-
#[legacy_exports];
3130
fn get_tydesc<T>() -> *();
3231
fn size_of<T>() -> uint;
3332
fn pref_align_of<T>() -> uint;

0 commit comments

Comments
 (0)
Please sign in to comment.