diff options
| author | Ralf Jung <post@ralfj.de> | 2018-08-30 18:05:49 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2018-08-30 18:05:49 +0200 |
| commit | 18a7bdb568b222b20e1bf30f23f945a10ea60c78 (patch) | |
| tree | deff21fd5a95f8e873302fa15b1158f1a2092655 | |
| parent | 274122426e5004c8bc6fb37fe55511812671a45a (diff) | |
| download | rust-18a7bdb568b222b20e1bf30f23f945a10ea60c78.tar.gz rust-18a7bdb568b222b20e1bf30f23f945a10ea60c78.zip | |
fix example
| -rw-r--r-- | src/libcore/ptr.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index b811b939295..9d9b6e4e6f8 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -157,8 +157,7 @@ pub use intrinsics::write_bytes; /// /// unsafe fn drop_after_copy<T>(to_drop: *mut T) { /// let mut copy: T = mem::uninitialized(); -/// let copy = &mut copy as *mut T; -/// ptr::copy(to_drop, copy, 1); +/// ptr::copy(to_drop, &mut copy, 1); /// drop(copy); /// } /// |
