Skip to content

Commit 2da9ca7

Browse files
committed
Remove duplicate sentence fragment from mem::zeroed doc
1 parent e75fa89 commit 2da9ca7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libcore/mem/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -583,10 +583,10 @@ pub const fn needs_drop<T>() -> bool {
583583
///
584584
/// There is no guarantee that an all-zero byte-pattern represents a valid value
585585
/// of some type `T`. For example, the all-zero byte-pattern is not a valid value
586-
/// for reference types (`&T`, `&mut T`) and functions pointers. Using `zeroed` on
587-
/// such types on such types causes immediate [undefined behavior][ub] because
588-
/// [the Rust compiler assumes][inv] that there always is a valid value in a
589-
/// variable it considers initialized.
586+
/// for reference types (`&T`, `&mut T`) and functions pointers. Using `zeroed`
587+
/// on such types causes immediate [undefined behavior][ub] because [the Rust
588+
/// compiler assumes][inv] that there always is a valid value in a variable it
589+
/// considers initialized.
590590
///
591591
/// This has the same effect as [`MaybeUninit::zeroed().assume_init()`][zeroed].
592592
/// It is useful for FFI sometimes, but should generally be avoided.

0 commit comments

Comments
 (0)