diff options
| author | Konrad Borowski <konrad@borowski.pw> | 2017-10-17 08:29:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-17 08:29:29 +0200 |
| commit | 8528508aa0850fa8286fb73503fb93263edaa976 (patch) | |
| tree | 27d3b89a1753d3ff9d76a5dab6e1fe2f42ead54a /src/libstd/primitive_docs.rs | |
| parent | db80da1c1a20529054ce6745a6219c2108693fb7 (diff) | |
| download | rust-8528508aa0850fa8286fb73503fb93263edaa976.tar.gz rust-8528508aa0850fa8286fb73503fb93263edaa976.zip | |
Update array documentation for Clone trait changes
Diffstat (limited to 'src/libstd/primitive_docs.rs')
| -rw-r--r-- | src/libstd/primitive_docs.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libstd/primitive_docs.rs b/src/libstd/primitive_docs.rs index 1edb35d8fe7..9e1da318242 100644 --- a/src/libstd/primitive_docs.rs +++ b/src/libstd/primitive_docs.rs @@ -284,7 +284,6 @@ mod prim_pointer { } /// Arrays of sizes from 0 to 32 (inclusive) implement the following traits if /// the element type allows it: /// -/// - [`Clone`][clone] (only if `T: `[`Copy`][copy]) /// - [`Debug`][debug] /// - [`IntoIterator`][intoiterator] (implemented for `&[T; N]` and `&mut [T; N]`) /// - [`PartialEq`][partialeq], [`PartialOrd`][partialord], [`Eq`][eq], [`Ord`][ord] @@ -299,8 +298,10 @@ mod prim_pointer { } /// entirely different types. As a stopgap, trait implementations are /// statically generated up to size 32. /// -/// Arrays of *any* size are [`Copy`][copy] if the element type is [`Copy`][copy]. This -/// works because the [`Copy`][copy] trait is specially known to the compiler. +/// Arrays of *any* size are [`Copy`][copy] if the element type is [`Copy`][copy] +/// and [`Clone`][clone] if the element type is [`Clone`][clone]. This works +/// because [`Copy`][copy] and [`Clone`][clone] traits are specially known +/// to the compiler. /// /// Arrays coerce to [slices (`[T]`)][slice], so a slice method may be called on /// an array. Indeed, this provides most of the API for working with arrays. |
