diff options
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/mem/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/mem/mod.rs b/src/libcore/mem/mod.rs index 226454561f6..70083ffa4be 100644 --- a/src/libcore/mem/mod.rs +++ b/src/libcore/mem/mod.rs @@ -583,7 +583,7 @@ pub const fn needs_drop<T>() -> bool { /// /// 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 -/// for reference types (`&T`, `&mut T` and functions pointers). Using `zeroed` on +/// for reference types (`&T`, `&mut T`) and functions pointers. Using `zeroed` on /// such types 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 considers initialized. @@ -613,7 +613,7 @@ pub const fn needs_drop<T>() -> bool { /// use std::mem; /// /// let _x: &i32 = unsafe { mem::zeroed() }; // Undefined behavior! -/// let _y: fn() = unsafe { mem::zeroed() }; // And again ! +/// let _y: fn() = unsafe { mem::zeroed() }; // And again! /// ``` #[inline(always)] #[stable(feature = "rust1", since = "1.0.0")] |
