]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #73955 - hellow554:unsafe_process, r=Mark-Simulacrum
authorDylan DPC <dylan.dpc@gmail.com>
Tue, 15 Sep 2020 23:30:28 +0000 (01:30 +0200)
committerGitHub <noreply@github.com>
Tue, 15 Sep 2020 23:30:28 +0000 (01:30 +0200)
deny(unsafe_op_in_unsafe_fn) in libstd/process.rs

The libstd/process.rs part of #73904 . Wraps the two calls to an unsafe fn Initializer::nop() in an unsafe block.

Will have to wait for #73909 to be merged, because of the feature in the libstd/lib.rs

1  2 
library/std/src/process.rs

index d1960a049d9062cb01e32b642b2a88e66cfda7fb,9048d93cbbfcf0847038192ed45884cd0320be9f..00e2dbc9c1dbf33e5d3c7c94c36edf4b6635f762
  //! assert_eq!(b"test", output.stdout.as_slice());
  //! ```
  //!
 -//! [`abort`]: fn.abort.html
 -//! [`exit`]: fn.exit.html
 +//! [`spawn`]: Command::spawn
 +//! [`output`]: Command::output
  //!
 -//! [`Command`]: struct.Command.html
 -//! [`spawn`]: struct.Command.html#method.spawn
 -//! [`output`]: struct.Command.html#method.output
 +//! [`stdout`]: Command::stdout
 +//! [`stdin`]: Command::stdin
 +//! [`stderr`]: Command::stderr
  //!
 -//! [`Child`]: struct.Child.html
 -//! [`ChildStdin`]: struct.ChildStdin.html
 -//! [`ChildStdout`]: struct.ChildStdout.html
 -//! [`ChildStderr`]: struct.ChildStderr.html
 -//! [`Stdio`]: struct.Stdio.html
 -//!
 -//! [`stdout`]: struct.Command.html#method.stdout
 -//! [`stdin`]: struct.Command.html#method.stdin
 -//! [`stderr`]: struct.Command.html#method.stderr
 -//!
 -//! [`Write`]: ../io/trait.Write.html
 -//! [`Read`]: ../io/trait.Read.html
 +//! [`Write`]: io::Write
 +//! [`Read`]: io::Read
  
  #![stable(feature = "process", since = "1.0.0")]
+ #![deny(unsafe_op_in_unsafe_fn)]
  
 +#[cfg(all(test, not(any(target_os = "cloudabi", target_os = "emscripten", target_env = "sgx"))))]
 +mod tests;
 +
  use crate::io::prelude::*;
  
  use crate::ffi::OsStr;