File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -81,8 +81,8 @@ One of the main uses of this function has been to lazily allocate arrays.
81
81
However, [ ` mem::uninitialized ` ] is an incredibly dangerous operation that essentially
82
82
cannot be used correctly as the Rust compiler assumes that values are properly initialized.
83
83
For example, calling ` mem::uninitialized::<bool>() ` causes * instantaneous __ undefined behavior__ *
84
- as the random bits in memory could be something other than ` 0 ` (for ` false ` ) and ` 1 ` (for ` true ` )
85
- -- the only two allowed bit patterns for ` bool ` .
84
+ as the uninitialized bits could be something other than ` 0 ` (for ` false ` )
85
+ and ` 1 ` (for ` true ` ) -- the only two allowed bit patterns for ` bool ` .
86
86
87
87
To remedy this situation, in Rust 1.36.0, the type [ ` MaybeUninit<T> ` ] has been [ stabilized] [ pr-60445 ] .
88
88
The Rust compiler will understand that it should not assume that a [ ` MaybeUninit<T> ` ] is a properly initialized ` T ` .
You can’t perform that action at this time.
0 commit comments