Skip to content

Commit 18a7bdb

Browse files
committed
fix example
1 parent 2741224 commit 18a7bdb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/libcore/ptr.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@ pub use intrinsics::write_bytes;
157157
///
158158
/// unsafe fn drop_after_copy<T>(to_drop: *mut T) {
159159
/// let mut copy: T = mem::uninitialized();
160-
/// let copy = &mut copy as *mut T;
161-
/// ptr::copy(to_drop, copy, 1);
160+
/// ptr::copy(to_drop, &mut copy, 1);
162161
/// drop(copy);
163162
/// }
164163
///

0 commit comments

Comments
 (0)