File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments