We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 05762e3 + 54eb376 commit 39436ebCopy full SHA for 39436eb
library/core/src/mem/maybe_uninit.rs
@@ -336,8 +336,8 @@ impl<T> MaybeUninit<T> {
336
/// assert_eq!(x, (0, false));
337
/// ```
338
///
339
- /// *Incorrect* usage of this function: initializing a struct with zero, where some fields
340
- /// cannot hold 0 as a valid value.
+ /// *Incorrect* usage of this function: calling `x.zeroed().assume_init()`
+ /// when `0` is not a valid bit-pattern for the type:
341
342
/// ```rust,no_run
343
/// use std::mem::MaybeUninit;
0 commit comments