Skip to content

Commit b564c4a

Browse files
Fix example for ptr::replace
1 parent ee259e4 commit b564c4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/ptr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ unsafe fn swap_nonoverlapping_bytes(x: *mut u8, y: *mut u8, len: usize) {
337337
/// // `mem::replace` would have the same effect without requiring the unsafe
338338
/// // block.
339339
/// let b = unsafe {
340-
/// ptr::replace(&mut a[0], 'r')
340+
/// ptr::replace(&mut rust[0], 'r')
341341
/// };
342342
///
343343
/// assert_eq!(b, 'b');

0 commit comments

Comments
 (0)