Reword incorrect use of zeroed()
This commit is contained in:
parent
36bb5e8a42
commit
54eb3768e0
1 changed files with 2 additions and 3 deletions
|
@ -336,9 +336,8 @@ impl<T> MaybeUninit<T> {
|
||||||
/// assert_eq!(x, (0, false));
|
/// assert_eq!(x, (0, false));
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// *Incorrect* usage of this function: assuming zero filled memory is initialized,
|
/// *Incorrect* usage of this function: calling `x.zeroed().assume_init()`
|
||||||
/// where some fields cannot hold 0 as a valid value, without overwriting with a
|
/// when `0` is not a valid bit-pattern for the type:
|
||||||
/// valid bit-pattern.
|
|
||||||
///
|
///
|
||||||
/// ```rust,no_run
|
/// ```rust,no_run
|
||||||
/// use std::mem::MaybeUninit;
|
/// use std::mem::MaybeUninit;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue