Rollup merge of #129826 - Alcaro:patch-1, r=workingjubilee

library: Fix typo in `core::mem`

This typo looks unnecessary
This commit is contained in:
Matthias Krüger 2024-08-31 20:36:28 +02:00 committed by GitHub
commit 4151fd407e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -612,7 +612,7 @@ pub const fn needs_drop<T: ?Sized>() -> bool {
/// ///
/// There is no guarantee that an all-zero byte-pattern represents a valid value /// There is no guarantee that an all-zero byte-pattern represents a valid value
/// of some type `T`. For example, the all-zero byte-pattern is not a valid value /// of some type `T`. For example, the all-zero byte-pattern is not a valid value
/// for reference types (`&T`, `&mut T`) and functions pointers. Using `zeroed` /// for reference types (`&T`, `&mut T`) and function pointers. Using `zeroed`
/// on such types causes immediate [undefined behavior][ub] because [the Rust /// on such types causes immediate [undefined behavior][ub] because [the Rust
/// compiler assumes][inv] that there always is a valid value in a variable it /// compiler assumes][inv] that there always is a valid value in a variable it
/// considers initialized. /// considers initialized.