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