diff options
| author | Ralf Jung <post@ralfj.de> | 2019-02-05 17:22:46 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2019-02-05 18:46:43 +0100 |
| commit | aaafc3c7fa1846b952b1a479ed69420b9b3f86bb (patch) | |
| tree | 76c53d0926f0f25b73231b31526a225154bf101e /src | |
| parent | 789b4d1a4f9a4c0cfbce51f0939b5ec322abca0c (diff) | |
fix doctest
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcore/mem.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index 68f985ce652..18302e36ff7 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -1042,7 +1042,7 @@ impl<T: ?Sized> DerefMut for ManuallyDrop<T> { /// even in unsafe code. As a consequence, 0-initializing a variable of reference /// type causes instantaneous undefined behavior, no matter whether that reference /// ever gets used to access memory: -/// ```rust,ignore +/// ```rust,no_run /// use std::mem; /// /// let x: &i32 = mem::zeroed(); // undefined behavior! @@ -1065,7 +1065,7 @@ impl<T: ?Sized> DerefMut for ManuallyDrop<T> { /// // Set it to a valid value. /// x.set(&0); /// // Extract the initialized data -- this is only allowed *after* properly -/// initializing `x`! +/// // initializing `x`! /// let x = unsafe { x.into_initialized() }; /// ``` /// The compiler then knows to not optimize this code. |
