File tree 1 file changed +2
-2
lines changed
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 {
583
583
///
584
584
/// There is no guarantee that an all-zero byte-pattern represents a valid value
585
585
/// 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
587
587
/// such types on such types causes immediate [undefined behavior][ub] because
588
588
/// [the Rust compiler assumes][inv] that there always is a valid value in a
589
589
/// variable it considers initialized.
@@ -613,7 +613,7 @@ pub const fn needs_drop<T>() -> bool {
613
613
/// use std::mem;
614
614
///
615
615
/// 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!
617
617
/// ```
618
618
#[ inline( always) ]
619
619
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
You can’t perform that action at this time.
0 commit comments