about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/io/util.rs8
-rw-r--r--library/std/src/lazy.rs4
2 files changed, 6 insertions, 6 deletions
diff --git a/library/std/src/io/util.rs b/library/std/src/io/util.rs
index bf289fe040e..b3df6f49dc4 100644
--- a/library/std/src/io/util.rs
+++ b/library/std/src/io/util.rs
@@ -52,24 +52,24 @@ where
     W: Write,
 {
     let mut buf = MaybeUninit::<[u8; super::DEFAULT_BUF_SIZE]>::uninit();
-    // FIXME(#53491): This is calling `get_mut` and `get_ref` on an uninitialized
+    // FIXME(#76092): This is calling `get_mut` and `get_ref` on an uninitialized
     // `MaybeUninit`. Revisit this once we decided whether that is valid or not.
     // This is still technically undefined behavior due to creating a reference
     // to uninitialized data, but within libstd we can rely on more guarantees
     // than if this code were in an external lib.
     unsafe {
-        reader.initializer().initialize(buf.get_mut());
+        reader.initializer().initialize(buf.assume_init_mut());
     }
 
     let mut written = 0;
     loop {
-        let len = match reader.read(unsafe { buf.get_mut() }) {
+        let len = match reader.read(unsafe { buf.assume_init_mut() }) {
             Ok(0) => return Ok(written),
             Ok(len) => len,
             Err(ref e) if e.kind() == ErrorKind::Interrupted => continue,
             Err(e) => return Err(e),
         };
-        writer.write_all(unsafe { &buf.get_ref()[..len] })?;
+        writer.write_all(unsafe { &buf.assume_init_ref()[..len] })?;
         written += len as u64;
     }
 }
diff --git a/library/std/src/lazy.rs b/library/std/src/lazy.rs
index 1129f29e949..845e9d76a77 100644
--- a/library/std/src/lazy.rs
+++ b/library/std/src/lazy.rs
@@ -379,13 +379,13 @@ impl<T> SyncOnceCell<T> {
     /// Safety: The value must be initialized
     unsafe fn get_unchecked(&self) -> &T {
         debug_assert!(self.is_initialized());
-        (&*self.value.get()).get_ref()
+        (&*self.value.get()).assume_init_ref()
     }
 
     /// Safety: The value must be initialized
     unsafe fn get_unchecked_mut(&mut self) -> &mut T {
         debug_assert!(self.is_initialized());
-        (&mut *self.value.get()).get_mut()
+        (&mut *self.value.get()).assume_init_mut()
     }
 }