File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -583,7 +583,7 @@ 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
586+ /// for reference types (`&T`, `&mut T`) and functions pointers. Using `zeroed` on
587587/// such types on such types causes immediate [undefined behavior][ub] because
588588/// [the Rust compiler assumes][inv] that there always is a valid value in a
589589/// variable it considers initialized.
@@ -613,7 +613,7 @@ pub const fn needs_drop<T>() -> bool {
613613/// use std::mem;
614614///
615615/// let _x: &i32 = unsafe { mem::zeroed() }; // Undefined behavior!
616- /// let _y: fn() = unsafe { mem::zeroed() }; // And again !
616+ /// let _y: fn() = unsafe { mem::zeroed() }; // And again!
617617/// ```
618618#[ inline( always) ]
619619#[ stable( feature = "rust1" , since = "1.0.0" ) ]
You can’t perform that action at this time.
0 commit comments