@@ -992,11 +992,11 @@ extern "rust-intrinsic" {
992
992
///
993
993
/// * The two regions of memory must *not* overlap.
994
994
///
995
- /// Additionally, if `T` is not [`Copy`](../marker/trait.Copy), only the region at `src` *or* the
996
- /// region at `dst` can be used or dropped after calling
997
- /// `copy_nonoverlapping`. `copy_nonoverlapping` creates bitwise copies of
998
- /// `T`, regardless of whether `T: Copy`, which can result in undefined
999
- /// behavior if both copies are used.
995
+ /// Additionally, if `T` is not [`Copy`](../marker/trait.Copy), only the
996
+ /// region at `src` *or* the region at ` dst` can be used or dropped after
997
+ /// calling `copy_nonoverlapping`. `copy_nonoverlapping` creates bitwise
998
+ /// copies of `T`, regardless of whether `T: Copy`, which can result in
999
+ /// undefined behavior if both copies are used.
1000
1000
///
1001
1001
/// [Undefined Behavior]: ../../reference/behavior-considered-undefined.html
1002
1002
///
@@ -1149,7 +1149,7 @@ extern "rust-intrinsic" {
1149
1149
///
1150
1150
/// Creating an invalid value:
1151
1151
///
1152
- /// ```ignore
1152
+ /// ```no_run
1153
1153
/// use std::{mem, ptr};
1154
1154
///
1155
1155
/// let mut v = Box::new(0i32);
@@ -1161,6 +1161,7 @@ extern "rust-intrinsic" {
1161
1161
/// }
1162
1162
///
1163
1163
/// // At this point, using or dropping `v` results in undefined behavior.
1164
+ /// // v = Box::new(0i32); // ERROR
1164
1165
/// ```
1165
1166
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1166
1167
pub fn write_bytes < T > ( dst : * mut T , val : u8 , count : usize ) ;
0 commit comments