diff options
| author | JOE1994 <joseph942010@gmail.com> | 2020-05-31 14:37:26 -0400 | 
|---|---|---|
| committer | JOE1994 <joseph942010@gmail.com> | 2020-05-31 14:37:26 -0400 | 
| commit | dd0338fbac143cb0c3844575f5ae4406854b56c5 (patch) | |
| tree | d46df8b13d60d462ed5d65bef316fb01a1507904 /src/libcore/slice/mod.rs | |
| parent | f6072cab136beea206b7cfe79f8d10fccf5af591 (diff) | |
| download | rust-dd0338fbac143cb0c3844575f5ae4406854b56c5.tar.gz rust-dd0338fbac143cb0c3844575f5ae4406854b56c5.zip  | |
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' in the doc comments. Thank you for reviewing this PR :)
Diffstat (limited to 'src/libcore/slice/mod.rs')
| -rw-r--r-- | src/libcore/slice/mod.rs | 4 | 
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 ///  | 
