Make most of std::rt private

Previously, the entire runtime API surface was publicly exposed, but
that is neither necessary nor desirable. This commit hides most of the
module, using librustrt directly as needed. The arrangement will need to
be revisited when rustrt is pulled into std.

[breaking-change]
This commit is contained in:
Aaron Turon
2014-11-14 16:30:16 -08:00
parent 40c78ab037
commit 6987ad22e4
24 changed files with 64 additions and 81 deletions

View File

@@ -208,7 +208,7 @@ Accessing environment variables is not generally threadsafe.
Serialize access through a global lock.
*/
fn with_env_lock<T>(f: || -> T) -> T {
use rt::mutex::{StaticNativeMutex, NATIVE_MUTEX_INIT};
use rustrt::mutex::{StaticNativeMutex, NATIVE_MUTEX_INIT};
static LOCK: StaticNativeMutex = NATIVE_MUTEX_INIT;
@@ -1039,9 +1039,9 @@ fn real_args_as_bytes() -> Vec<Vec<u8>> {
target_os = "freebsd",
target_os = "dragonfly"))]
fn real_args_as_bytes() -> Vec<Vec<u8>> {
use rt;
use rustrt;
match rt::args::clone() {
match rustrt::args::clone() {
Some(args) => args,
None => panic!("process arguments not initialized")
}