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
//! [`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;
#[inline]
unsafe fn initializer(&self) -> Initializer {
- Initializer::nop()
+ // SAFETY: Read is guaranteed to work on uninitialized memory
+ unsafe { Initializer::nop() }
}
}
#[inline]
unsafe fn initializer(&self) -> Initializer {
- Initializer::nop()
+ // SAFETY: Read is guaranteed to work on uninitialized memory
+ unsafe { Initializer::nop() }
}
}