libstd => 2018
This commit is contained in:
parent
7e001e5c6c
commit
93b6d9e086
284 changed files with 1989 additions and 2024 deletions
|
@ -106,17 +106,17 @@
|
|||
|
||||
#![stable(feature = "process", since = "1.0.0")]
|
||||
|
||||
use io::prelude::*;
|
||||
use crate::io::prelude::*;
|
||||
|
||||
use ffi::OsStr;
|
||||
use fmt;
|
||||
use fs;
|
||||
use io::{self, Initializer};
|
||||
use path::Path;
|
||||
use str;
|
||||
use sys::pipe::{read2, AnonPipe};
|
||||
use sys::process as imp;
|
||||
use sys_common::{AsInner, AsInnerMut, FromInner, IntoInner};
|
||||
use crate::ffi::OsStr;
|
||||
use crate::fmt;
|
||||
use crate::fs;
|
||||
use crate::io::{self, Initializer};
|
||||
use crate::path::Path;
|
||||
use crate::str;
|
||||
use crate::sys::pipe::{read2, AnonPipe};
|
||||
use crate::sys::process as imp;
|
||||
use crate::sys_common::{AsInner, AsInnerMut, FromInner, IntoInner};
|
||||
|
||||
/// Representation of a running or exited child process.
|
||||
///
|
||||
|
@ -1481,8 +1481,8 @@ impl Child {
|
|||
/// [platform-specific behavior]: #platform-specific-behavior
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub fn exit(code: i32) -> ! {
|
||||
::sys_common::cleanup();
|
||||
::sys::os::exit(code)
|
||||
crate::sys_common::cleanup();
|
||||
crate::sys::os::exit(code)
|
||||
}
|
||||
|
||||
/// Terminates the process in an abnormal fashion.
|
||||
|
@ -1543,7 +1543,7 @@ pub fn exit(code: i32) -> ! {
|
|||
/// [panic hook]: ../../std/panic/fn.set_hook.html
|
||||
#[stable(feature = "process_abort", since = "1.17.0")]
|
||||
pub fn abort() -> ! {
|
||||
unsafe { ::sys::abort_internal() };
|
||||
unsafe { crate::sys::abort_internal() };
|
||||
}
|
||||
|
||||
/// Returns the OS-assigned process identifier associated with this process.
|
||||
|
@ -1561,7 +1561,7 @@ pub fn abort() -> ! {
|
|||
///
|
||||
#[stable(feature = "getpid", since = "1.26.0")]
|
||||
pub fn id() -> u32 {
|
||||
::sys::os::getpid()
|
||||
crate::sys::os::getpid()
|
||||
}
|
||||
|
||||
/// A trait for implementing arbitrary return types in the `main` function.
|
||||
|
@ -1623,10 +1623,10 @@ impl Termination for ExitCode {
|
|||
|
||||
#[cfg(all(test, not(any(target_os = "cloudabi", target_os = "emscripten"))))]
|
||||
mod tests {
|
||||
use io::prelude::*;
|
||||
use crate::io::prelude::*;
|
||||
|
||||
use io::ErrorKind;
|
||||
use str;
|
||||
use crate::io::ErrorKind;
|
||||
use crate::str;
|
||||
use super::{Command, Output, Stdio};
|
||||
|
||||
// FIXME(#10380) these tests should not all be ignored on android.
|
||||
|
@ -1671,7 +1671,7 @@ mod tests {
|
|||
#[cfg(unix)]
|
||||
#[cfg_attr(target_os = "android", ignore)]
|
||||
fn signal_reported_right() {
|
||||
use os::unix::process::ExitStatusExt;
|
||||
use crate::os::unix::process::ExitStatusExt;
|
||||
|
||||
let mut p = Command::new("/bin/sh")
|
||||
.arg("-c").arg("read a")
|
||||
|
@ -1741,8 +1741,8 @@ mod tests {
|
|||
#[cfg_attr(target_os = "android", ignore)]
|
||||
#[cfg(unix)]
|
||||
fn uid_works() {
|
||||
use os::unix::prelude::*;
|
||||
use libc;
|
||||
use crate::os::unix::prelude::*;
|
||||
|
||||
let mut p = Command::new("/bin/sh")
|
||||
.arg("-c").arg("true")
|
||||
.uid(unsafe { libc::getuid() })
|
||||
|
@ -1755,8 +1755,7 @@ mod tests {
|
|||
#[cfg_attr(target_os = "android", ignore)]
|
||||
#[cfg(unix)]
|
||||
fn uid_to_root_fails() {
|
||||
use os::unix::prelude::*;
|
||||
use libc;
|
||||
use crate::os::unix::prelude::*;
|
||||
|
||||
// if we're already root, this isn't a valid test. Most of the bots run
|
||||
// as non-root though (android is an exception).
|
||||
|
@ -1881,7 +1880,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn test_override_env() {
|
||||
use env;
|
||||
use crate::env;
|
||||
|
||||
// In some build environments (such as chrooted Nix builds), `env` can
|
||||
// only be found in the explicitly-provided PATH env variable, not in
|
||||
|
@ -1910,7 +1909,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn test_capture_env_at_spawn() {
|
||||
use env;
|
||||
use crate::env;
|
||||
|
||||
let mut cmd = env_cmd();
|
||||
cmd.env("RUN_TEST_NEW_ENV1", "123");
|
||||
|
@ -1985,8 +1984,8 @@ mod tests {
|
|||
#[test]
|
||||
#[cfg(windows)]
|
||||
fn test_creation_flags() {
|
||||
use os::windows::process::CommandExt;
|
||||
use sys::c::{BOOL, DWORD, INFINITE};
|
||||
use crate::os::windows::process::CommandExt;
|
||||
use crate::sys::c::{BOOL, DWORD, INFINITE};
|
||||
#[repr(C, packed)]
|
||||
struct DEBUG_EVENT {
|
||||
pub event_code: DWORD,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue