mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-30 06:43:20 +03:00
deny(unsafe_op_in_unsafe_fn) in libstd/process.rs
This commit is contained in:
@@ -105,6 +105,7 @@
|
||||
//! [`Read`]: ../io/trait.Read.html
|
||||
|
||||
#![stable(feature = "process", since = "1.0.0")]
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::io::prelude::*;
|
||||
|
||||
@@ -311,7 +312,8 @@ fn is_read_vectored(&self) -> bool {
|
||||
|
||||
#[inline]
|
||||
unsafe fn initializer(&self) -> Initializer {
|
||||
Initializer::nop()
|
||||
// SAFETY: Read is guaranteed to work on uninitialized memory
|
||||
unsafe { Initializer::nop() }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -372,7 +374,8 @@ fn is_read_vectored(&self) -> bool {
|
||||
|
||||
#[inline]
|
||||
unsafe fn initializer(&self) -> Initializer {
|
||||
Initializer::nop()
|
||||
// SAFETY: Read is guaranteed to work on uninitialized memory
|
||||
unsafe { Initializer::nop() }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user