File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -52,11 +52,14 @@ where
52
52
W : Write ,
53
53
{
54
54
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;
60
63
unsafe {
61
64
reader. initializer ( ) . initialize ( buf. assume_init_mut ( ) ) ;
62
65
}
You can’t perform that action at this time.
0 commit comments