diff options
| author | bors <bors@rust-lang.org> | 2015-09-11 19:42:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-09-11 19:42:19 +0000 |
| commit | c8ded9a14f16a4b5ce3facc3bedfd957dbe433fe (patch) | |
| tree | d610a1695c2d8b14fbecaf9010a7eed0580a2eda /src/libstd/sys/windows | |
| parent | eda85fede0ed55205545f0508b834994d86414ea (diff) | |
| parent | f4be2026dfb507e5db919cc5df8fd934e05fa0b8 (diff) | |
| download | rust-c8ded9a14f16a4b5ce3facc3bedfd957dbe433fe.tar.gz rust-c8ded9a14f16a4b5ce3facc3bedfd957dbe433fe.zip | |
Auto merge of #28306 - alexcrichton:less-rt, r=brson
This commit does some refactoring to make almost all of the `std::rt` private. Specifically, the following items are no longer part of its API: * DEFAULT_ERROR_CODE * backtrace * unwind * args * at_exit * cleanup * heap (this is just alloc::heap) * min_stack * util The module is now tagged as `#[doc(hidden)]` as the only purpose it's serve is an entry point for the `panic!` macro via the `begin_unwind` and `begin_unwind_fmt` reexports.
Diffstat (limited to 'src/libstd/sys/windows')
| -rw-r--r-- | src/libstd/sys/windows/mod.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/windows/net.rs | 5 | ||||
| -rw-r--r-- | src/libstd/sys/windows/stack_overflow.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/windows/thread_local.rs | 4 |
4 files changed, 7 insertions, 6 deletions
diff --git a/src/libstd/sys/windows/mod.rs b/src/libstd/sys/windows/mod.rs index 732e2e65864..04bb5e5ea38 100644 --- a/src/libstd/sys/windows/mod.rs +++ b/src/libstd/sys/windows/mod.rs @@ -43,6 +43,8 @@ pub mod thread_local; pub mod time; pub mod stdio; +pub fn init() {} + pub fn decode_error_kind(errno: i32) -> ErrorKind { match errno as libc::c_int { libc::ERROR_ACCESS_DENIED => ErrorKind::PermissionDenied, diff --git a/src/libstd/sys/windows/net.rs b/src/libstd/sys/windows/net.rs index e62b2d8cb18..998b4fcb1a1 100644 --- a/src/libstd/sys/windows/net.rs +++ b/src/libstd/sys/windows/net.rs @@ -16,11 +16,10 @@ use net::SocketAddr; use num::One; use ops::Neg; use ptr; -use rt; use sync::Once; use sys; use sys::c; -use sys_common::{AsInner, FromInner, IntoInner}; +use sys_common::{self, AsInner, FromInner, IntoInner}; use sys_common::net::{setsockopt, getsockopt}; use time::Duration; @@ -39,7 +38,7 @@ pub fn init() { &mut data); assert_eq!(ret, 0); - let _ = rt::at_exit(|| { c::WSACleanup(); }); + let _ = sys_common::at_exit(|| { c::WSACleanup(); }); }); } diff --git a/src/libstd/sys/windows/stack_overflow.rs b/src/libstd/sys/windows/stack_overflow.rs index f93f7c756de..d1c2144ef0d 100644 --- a/src/libstd/sys/windows/stack_overflow.rs +++ b/src/libstd/sys/windows/stack_overflow.rs @@ -9,7 +9,7 @@ // except according to those terms. use libc::{self, LONG}; -use rt::util::report_overflow; +use sys_common::util::report_overflow; use sys::c; pub struct Handler; diff --git a/src/libstd/sys/windows/thread_local.rs b/src/libstd/sys/windows/thread_local.rs index 17bc7ee8876..c544eec7fce 100644 --- a/src/libstd/sys/windows/thread_local.rs +++ b/src/libstd/sys/windows/thread_local.rs @@ -13,7 +13,7 @@ use prelude::v1::*; use libc::types::os::arch::extra::{DWORD, LPVOID, BOOL}; use ptr; -use rt; +use sys_common; use sys_common::mutex::Mutex; pub type Key = DWORD; @@ -133,7 +133,7 @@ unsafe fn init_dtors() { let dtors = box Vec::<(Key, Dtor)>::new(); - let res = rt::at_exit(move|| { + let res = sys_common::at_exit(move|| { DTOR_LOCK.lock(); let dtors = DTORS; DTORS = 1 as *mut _; |
