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 @@ -1042,7 +1042,7 @@ impl<T: ?Sized> DerefMut for ManuallyDrop<T> {
10421042/// even in unsafe code. As a consequence, 0-initializing a variable of reference
10431043/// type causes instantaneous undefined behavior, no matter whether that reference
10441044/// ever gets used to access memory:
1045- /// ```rust,ignore
1045+ /// ```rust,no_run
10461046/// use std::mem;
10471047///
10481048/// let x: &i32 = mem::zeroed(); // undefined behavior!
@@ -1065,7 +1065,7 @@ impl<T: ?Sized> DerefMut for ManuallyDrop<T> {
10651065/// // Set it to a valid value.
10661066/// x.set(&0);
10671067/// // Extract the initialized data -- this is only allowed *after* properly
1068- /// initializing `x`!
1068+ /// // initializing `x`!
10691069/// let x = unsafe { x.into_initialized() };
10701070/// ```
10711071/// The compiler then knows to not optimize this code.
You can’t perform that action at this time.
0 commit comments