We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b8b702f + ed9afee commit cc237b3Copy full SHA for cc237b3
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