about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-05-31 21:30:05 +0200
committerGitHub <noreply@github.com>2020-05-31 21:30:05 +0200
commit2d4ed2aedd9cbd64aa97fed6455140a03c8ce0de (patch)
tree50a7f5d4d6f43a68e083a84e2b50d598ce1ed0bc /src/libcore
parent5480120b26adcc336cef43f0c8045aaba4574359 (diff)
parentdd0338fbac143cb0c3844575f5ae4406854b56c5 (diff)
downloadrust-2d4ed2aedd9cbd64aa97fed6455140a03c8ce0de.tar.gz
rust-2d4ed2aedd9cbd64aa97fed6455140a03c8ce0de.zip
Rollup merge of #72829 - JOE1994:clarify_terms, r=jonas-schievink
Clarify terms in doc comments

Doc comments of `copy_from_slice` say that people should use `clone_from_slice`
when 'src' doesn't implement `Copy`. However, 'src' is a reference and
it always implements `Copy`. The term 'src' should be fixed to `T`(element type of slice 'src') in
the doc comments.

Thank you for reviewing this PR :)  :smiley_cat:
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/slice/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs
index 2361749f166..ff333f77334 100644
--- a/src/libcore/slice/mod.rs
+++ b/src/libcore/slice/mod.rs
@@ -2173,7 +2173,7 @@ impl<T> [T] {
     ///
     /// The length of `src` must be the same as `self`.
     ///
-    /// If `src` implements `Copy`, it can be more performant to use
+    /// If `T` implements `Copy`, it can be more performant to use
     /// [`copy_from_slice`].
     ///
     /// # Panics
@@ -2244,7 +2244,7 @@ impl<T> [T] {
     ///
     /// The length of `src` must be the same as `self`.
     ///
-    /// If `src` does not implement `Copy`, use [`clone_from_slice`].
+    /// If `T` does not implement `Copy`, use [`clone_from_slice`].
     ///
     /// # Panics
     ///