We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9491f18 commit 8dc1e42Copy full SHA for 8dc1e42
src/libstd/net/tcp.rs
@@ -1,3 +1,4 @@
1
+#![deny(unsafe_op_in_unsafe_fn)]
2
use crate::io::prelude::*;
3
4
use crate::fmt;
@@ -583,7 +584,8 @@ impl Read for TcpStream {
583
584
585
#[inline]
586
unsafe fn initializer(&self) -> Initializer {
- Initializer::nop()
587
+ // SAFETY: Read is guaranteed to work on uninitialized memory
588
+ unsafe { Initializer::nop() }
589
}
590
591
#[stable(feature = "rust1", since = "1.0.0")]
@@ -622,7 +624,8 @@ impl Read for &TcpStream {
622
624
623
625
626
627
628
629
630
631
0 commit comments