about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPer Lundberg <per.lundberg@ecraft.com>2018-02-02 22:44:14 +0200
committerGitHub <noreply@github.com>2018-02-02 22:44:14 +0200
commit321e429b9f9318dccd93f0bb637be3a6c926daef (patch)
treee4ed047afc75e21b742709f17beb2a515f0b13e1
parent616b66dca25a67321b1654e5a65acc6337d63cf4 (diff)
downloadrust-321e429b9f9318dccd93f0bb637be3a6c926daef.tar.gz
rust-321e429b9f9318dccd93f0bb637be3a6c926daef.zip
copy_nonoverlapping example: Fixed typo
The comment referred to a variable using an incorrect name. (it has probably been renamed since the comment was written, or the comment was copied elsewhere - I noted the example in libcore has the `tmp` name for the temporary variable.)
-rw-r--r--src/libcore/intrinsics.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs
index a611dc02469..a05d67a304f 100644
--- a/src/libcore/intrinsics.rs
+++ b/src/libcore/intrinsics.rs
@@ -992,7 +992,7 @@ extern "rust-intrinsic" {
     ///         ptr::copy_nonoverlapping(y, x, 1);
     ///         ptr::copy_nonoverlapping(&t, y, 1);
     ///
-    ///         // y and t now point to the same thing, but we need to completely forget `tmp`
+    ///         // y and t now point to the same thing, but we need to completely forget `t`
     ///         // because it's no longer relevant.
     ///         mem::forget(t);
     ///     }