Skip to content

Commit 0af3bd0

Browse files
committed
Read: adjust a FIXME reference
1 parent e88e908 commit 0af3bd0

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Diff for: library/std/src/io/util.rs

+8-5
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,14 @@ where
5252
W: Write,
5353
{
5454
let mut buf = MaybeUninit::<[u8; super::DEFAULT_BUF_SIZE]>::uninit();
55-
// FIXME(#76092): This is calling `get_mut` and `get_ref` on an uninitialized
56-
// `MaybeUninit`. Revisit this once we decided whether that is valid or not.
57-
// This is still technically undefined behavior due to creating a reference
58-
// to uninitialized data, but within libstd we can rely on more guarantees
59-
// than if this code were in an external lib.
55+
// FIXME: #42788
56+
//
57+
// - This creates a (mut) reference to a slice of
58+
// _uninitialized_ integers, which is **undefined behavior**
59+
//
60+
// - Only the standard library gets to soundly "ignore" this,
61+
// based on its privileged knowledge of unstable rustc
62+
// internals;
6063
unsafe {
6164
reader.initializer().initialize(buf.assume_init_mut());
6265
}

0 commit comments

Comments
 (0)