Skip to content

Commit 8528508

Browse files
Update array documentation for Clone trait changes
1 parent db80da1 commit 8528508

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Diff for: src/libstd/primitive_docs.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ mod prim_pointer { }
284284
/// Arrays of sizes from 0 to 32 (inclusive) implement the following traits if
285285
/// the element type allows it:
286286
///
287-
/// - [`Clone`][clone] (only if `T: `[`Copy`][copy])
288287
/// - [`Debug`][debug]
289288
/// - [`IntoIterator`][intoiterator] (implemented for `&[T; N]` and `&mut [T; N]`)
290289
/// - [`PartialEq`][partialeq], [`PartialOrd`][partialord], [`Eq`][eq], [`Ord`][ord]
@@ -299,8 +298,10 @@ mod prim_pointer { }
299298
/// entirely different types. As a stopgap, trait implementations are
300299
/// statically generated up to size 32.
301300
///
302-
/// Arrays of *any* size are [`Copy`][copy] if the element type is [`Copy`][copy]. This
303-
/// works because the [`Copy`][copy] trait is specially known to the compiler.
301+
/// Arrays of *any* size are [`Copy`][copy] if the element type is [`Copy`][copy]
302+
/// and [`Clone`][clone] if the element type is [`Clone`][clone]. This works
303+
/// because [`Copy`][copy] and [`Clone`][clone] traits are specially known
304+
/// to the compiler.
304305
///
305306
/// Arrays coerce to [slices (`[T]`)][slice], so a slice method may be called on
306307
/// an array. Indeed, this provides most of the API for working with arrays.

0 commit comments

Comments
 (0)