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.
#[deny(unsafe_op_in_unsafe_fn)]
1 parent 16957bd commit 7616cd9Copy full SHA for 7616cd9
src/libstd/fs.rs
@@ -666,7 +666,8 @@ impl Read for File {
666
667
#[inline]
668
unsafe fn initializer(&self) -> Initializer {
669
- Initializer::nop()
+ // SAFETY: Read is guaranteed to work on uninitialized memory
670
+ unsafe { Initializer::nop() }
671
}
672
673
#[stable(feature = "rust1", since = "1.0.0")]
@@ -711,7 +712,8 @@ impl Read for &File {
711
712
713
714
715
716
717
718
719
0 commit comments