From 817576ee7001244da68a4ee315ebdc1163d4e648 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 16 Sep 2013 23:34:40 -0700 Subject: Register new snapshots --- src/libstd/rt/args.rs | 12 ------------ src/libstd/rt/io/buffered.rs | 4 ++-- src/libstd/rt/io/mod.rs | 8 ++------ src/libstd/rt/mod.rs | 12 ------------ src/libstd/rt/task.rs | 11 ++--------- src/libstd/rt/uv/uvll.rs | 41 ----------------------------------------- 6 files changed, 6 insertions(+), 82 deletions(-) (limited to 'src/libstd/rt') diff --git a/src/libstd/rt/args.rs b/src/libstd/rt/args.rs index afa8d3261fc..d8317c34f50 100644 --- a/src/libstd/rt/args.rs +++ b/src/libstd/rt/args.rs @@ -117,18 +117,6 @@ mod imp { } } - #[cfg(stage0)] - mod macro_hack { - #[macro_escape]; - macro_rules! externfn( - (fn $name:ident () $(-> $ret_ty:ty),*) => ( - extern { - fn $name() $(-> $ret_ty),*; - } - ) - ) - } - externfn!(fn rust_take_global_args_lock()) externfn!(fn rust_drop_global_args_lock()) externfn!(fn rust_get_global_args_ptr() -> *mut Option<~~[~str]>) diff --git a/src/libstd/rt/io/buffered.rs b/src/libstd/rt/io/buffered.rs index 579e581d87e..7988f640687 100644 --- a/src/libstd/rt/io/buffered.rs +++ b/src/libstd/rt/io/buffered.rs @@ -126,7 +126,7 @@ impl Decorator for BufferedReader { /// Wraps a Writer and buffers output to it /// -/// NOTE: `BufferedWriter` will NOT flush its buffer when dropped. +/// Note that `BufferedWriter` will NOT flush its buffer when dropped. pub struct BufferedWriter { priv inner: W, priv buf: ~[u8], @@ -204,7 +204,7 @@ impl Reader for InternalBufferedWriter { /// Wraps a Stream and buffers input and output to and from it /// -/// NOTE: `BufferedStream` will NOT flush its output buffer when dropped. +/// Note that `BufferedStream` will NOT flush its output buffer when dropped. // FIXME #9155 this should be a newtype struct pub struct BufferedStream { priv inner: BufferedReader> diff --git a/src/libstd/rt/io/mod.rs b/src/libstd/rt/io/mod.rs index 871b41039d1..bfec2e9bdf8 100644 --- a/src/libstd/rt/io/mod.rs +++ b/src/libstd/rt/io/mod.rs @@ -388,17 +388,13 @@ impl ToStr for IoErrorKind { // XXX: Can't put doc comments on macros // Raised by `I/O` operations on error. condition! { - // NOTE: this super::IoError should be IoError - // Change this next time the snapshot is updated. - pub io_error: super::IoError -> (); + pub io_error: IoError -> (); } // XXX: Can't put doc comments on macros // Raised by `read` on error condition! { - // NOTE: this super::IoError should be IoError - // Change this next time the snapshot it updated. - pub read_error: super::IoError -> (); + pub read_error: IoError -> (); } /// Helper for wrapper calls where you want to diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs index 53f62786b62..6df857b8d55 100644 --- a/src/libstd/rt/mod.rs +++ b/src/libstd/rt/mod.rs @@ -198,18 +198,6 @@ pub fn start_on_main_thread(argc: int, argv: **u8, crate_map: *u8, main: ~fn()) return exit_code; } -#[cfg(stage0)] -mod macro_hack { -#[macro_escape]; -macro_rules! externfn( - (fn $name:ident ($($arg_name:ident : $arg_ty:ty),*) $(-> $ret_ty:ty),*) => ( - extern { - fn $name($($arg_name : $arg_ty),*) $(-> $ret_ty),*; - } - ) -) -} - /// One-time runtime initialization. /// /// Initializes global state, including frobbing diff --git a/src/libstd/rt/task.rs b/src/libstd/rt/task.rs index 09f5ee7febb..09bd89ec94a 100644 --- a/src/libstd/rt/task.rs +++ b/src/libstd/rt/task.rs @@ -444,17 +444,10 @@ impl Unwinder { } extern { - #[cfg(not(stage0))] #[rust_stack] fn rust_try(f: extern "C" fn(*c_void, *c_void), code: *c_void, data: *c_void) -> uintptr_t; - - #[cfg(stage0)] - #[rust_stack] - fn rust_try(f: *u8, - code: *c_void, - data: *c_void) -> uintptr_t; } } @@ -490,10 +483,10 @@ mod test { fn tls() { use local_data; do run_in_newsched_task() { - static key: local_data::Key<@~str> = &local_data::Key; + local_data_key!(key: @~str) local_data::set(key, @~"data"); assert!(*local_data::get(key, |k| k.map_move(|k| *k)).unwrap() == ~"data"); - static key2: local_data::Key<@~str> = &local_data::Key; + local_data_key!(key2: @~str) local_data::set(key2, @~"data"); assert!(*local_data::get(key2, |k| k.map_move(|k| *k)).unwrap() == ~"data"); } diff --git a/src/libstd/rt/uv/uvll.rs b/src/libstd/rt/uv/uvll.rs index 42102a52e2e..9591fc82df4 100644 --- a/src/libstd/rt/uv/uvll.rs +++ b/src/libstd/rt/uv/uvll.rs @@ -31,7 +31,6 @@ use c_str::ToCStr; use libc::{size_t, c_int, c_uint, c_void, c_char, uintptr_t}; -#[cfg(not(stage0))] use libc::ssize_t; use libc::{malloc, free}; use libc; @@ -149,73 +148,33 @@ impl uv_stat_t { } } -#[cfg(stage0)] -pub type uv_idle_cb = *u8; -#[cfg(stage0)] -pub type uv_alloc_cb = *u8; -#[cfg(stage0)] -pub type uv_read_cb = *u8; -#[cfg(stage0)] -pub type uv_udp_send_cb = *u8; -#[cfg(stage0)] -pub type uv_udp_recv_cb = *u8; -#[cfg(stage0)] -pub type uv_close_cb = *u8; -#[cfg(stage0)] -pub type uv_walk_cb = *u8; -#[cfg(stage0)] -pub type uv_async_cb = *u8; -#[cfg(stage0)] -pub type uv_connect_cb = *u8; -#[cfg(stage0)] -pub type uv_connection_cb = *u8; -#[cfg(stage0)] -pub type uv_timer_cb = *u8; -#[cfg(stage0)] -pub type uv_write_cb = *u8; -#[cfg(stage0)] -pub type uv_getaddrinfo_cb = *u8; - -#[cfg(not(stage0))] pub type uv_idle_cb = extern "C" fn(handle: *uv_idle_t, status: c_int); -#[cfg(not(stage0))] pub type uv_alloc_cb = extern "C" fn(stream: *uv_stream_t, suggested_size: size_t) -> uv_buf_t; -#[cfg(not(stage0))] pub type uv_read_cb = extern "C" fn(stream: *uv_stream_t, nread: ssize_t, buf: uv_buf_t); -#[cfg(not(stage0))] pub type uv_udp_send_cb = extern "C" fn(req: *uv_udp_send_t, status: c_int); -#[cfg(not(stage0))] pub type uv_udp_recv_cb = extern "C" fn(handle: *uv_udp_t, nread: ssize_t, buf: uv_buf_t, addr: *sockaddr, flags: c_uint); -#[cfg(not(stage0))] pub type uv_close_cb = extern "C" fn(handle: *uv_handle_t); -#[cfg(not(stage0))] pub type uv_walk_cb = extern "C" fn(handle: *uv_handle_t, arg: *c_void); -#[cfg(not(stage0))] pub type uv_async_cb = extern "C" fn(handle: *uv_async_t, status: c_int); -#[cfg(not(stage0))] pub type uv_connect_cb = extern "C" fn(handle: *uv_connect_t, status: c_int); -#[cfg(not(stage0))] pub type uv_connection_cb = extern "C" fn(handle: *uv_connection_t, status: c_int); -#[cfg(not(stage0))] pub type uv_timer_cb = extern "C" fn(handle: *uv_timer_t, status: c_int); -#[cfg(not(stage0))] pub type uv_write_cb = extern "C" fn(handle: *uv_write_t, status: c_int); -#[cfg(not(stage0))] pub type uv_getaddrinfo_cb = extern "C" fn(req: *uv_getaddrinfo_t, status: c_int, res: *addrinfo); -- cgit 1.4.1-3-g733a5