diff options
| author | bors <bors@rust-lang.org> | 2014-04-10 15:31:55 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-04-10 15:31:55 -0700 |
| commit | 0156af156d70efd5a3c96d0c5b8fc9bec39a7ae5 (patch) | |
| tree | 7cae8ac126922eee38607c2a0032c85cdad7ba0d /src/libstd/rt | |
| parent | 5bcb76181a3b0df2df5ade348af3a1d29fca795e (diff) | |
| parent | 1f2c18a0afd55bf3a5319d9e3810ec1ac6b3e1bb (diff) | |
| download | rust-0156af156d70efd5a3c96d0c5b8fc9bec39a7ae5.tar.gz rust-0156af156d70efd5a3c96d0c5b8fc9bec39a7ae5.zip | |
auto merge of #13443 : alexcrichton/rust/rollup, r=alexcrichton
Closes #13441 (debuginfo: Fixes and improvements for #12840, #12886, and #13213) Closes #13433 (Remove references to @Trait from a compiler error message) Closes #13430 (Fix outdated lint warning about inner attribute) Closes #13425 (Remove a pile of (mainly) internal `~[]` uses) Closes #13419 (Stop using transmute_mut in RefCell) Closes #13417 (Remove an unnecessary file `src/libnative/io/p`.) Closes #13409 (Closing assorted resolve bugs) Closes #13406 (Generalized the pretty-print entry points to support `-o <file>`.) Closes #13403 (test: Add a test for #7663) Closes #13402 (rustdoc: Prune the paths that do not appear in the index.) Closes #13396 (rustc: Remove absolute rpaths) Closes #13371 (Rename ast::Purity and ast::Impure Function. Closes #7287) Closes #13350 (collections: replace all ~[T] with Vec<T>.)
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/at_exit_imp.rs | 7 | ||||
| -rw-r--r-- | src/libstd/rt/rtio.rs | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/libstd/rt/at_exit_imp.rs b/src/libstd/rt/at_exit_imp.rs index 4be9c8a84ac..67b8b40b47e 100644 --- a/src/libstd/rt/at_exit_imp.rs +++ b/src/libstd/rt/at_exit_imp.rs @@ -20,8 +20,9 @@ use option::{Some, None}; use ptr::RawPtr; use unstable::sync::Exclusive; use slice::OwnedVector; +use vec::Vec; -type Queue = Exclusive<~[proc():Send]>; +type Queue = Exclusive<Vec<proc():Send>>; // You'll note that these variables are *not* atomic, and this is done on // purpose. This module is designed to have init() called *once* in a @@ -35,7 +36,7 @@ pub fn init() { unsafe { rtassert!(!RUNNING); rtassert!(QUEUE.is_null()); - let state: ~Queue = ~Exclusive::new(~[]); + let state: ~Queue = ~Exclusive::new(vec!()); QUEUE = cast::transmute(state); } } @@ -61,7 +62,7 @@ pub fn run() { QUEUE = 0 as *mut Queue; let mut vec = None; state.with(|arr| { - vec = Some(mem::replace(arr, ~[])); + vec = Some(mem::replace(arr, vec!())); }); vec.take_unwrap() }; diff --git a/src/libstd/rt/rtio.rs b/src/libstd/rt/rtio.rs index 1750e685627..cc8356d2b9a 100644 --- a/src/libstd/rt/rtio.rs +++ b/src/libstd/rt/rtio.rs @@ -20,6 +20,7 @@ use path::Path; use result::Err; use rt::local::Local; use rt::task::Task; +use vec::Vec; use ai = io::net::addrinfo; use io; @@ -168,7 +169,7 @@ pub trait IoFactory { fn fs_rmdir(&mut self, path: &CString) -> IoResult<()>; fn fs_rename(&mut self, path: &CString, to: &CString) -> IoResult<()>; fn fs_readdir(&mut self, path: &CString, flags: c_int) -> - IoResult<~[Path]>; + IoResult<Vec<Path>>; fn fs_lstat(&mut self, path: &CString) -> IoResult<FileStat>; fn fs_chown(&mut self, path: &CString, uid: int, gid: int) -> IoResult<()>; |
