Skip to content

Commit aaafc3c

Browse files
committed
fix doctest
1 parent 789b4d1 commit aaafc3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcore/mem.rs

+2-2
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)