Skip to content

Commit e305b99

Browse files
Rollup merge of #39276 - GuillaumeGomez:array_urls, r=frewsxcv
Add missing urls for array docs r? @frewsxcv
2 parents ee74420 + c8d1f32 commit e305b99

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

src/libstd/primitive_docs.rs

+22-21
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ mod prim_pointer { }
272272
/// Arrays of sizes from 0 to 32 (inclusive) implement the following traits if
273273
/// the element type allows it:
274274
///
275-
/// - [`Clone`][clone] (only if `T: Copy`)
275+
/// - [`Clone`][clone] (only if `T: [Copy][copy]`)
276276
/// - [`Debug`][debug]
277277
/// - [`IntoIterator`][intoiterator] (implemented for `&[T; N]` and `&mut [T; N]`)
278278
/// - [`PartialEq`][partialeq], [`PartialOrd`][partialord], [`Eq`][eq], [`Ord`][ord]
@@ -287,8 +287,8 @@ mod prim_pointer { }
287287
/// entirely different types. As a stopgap, trait implementations are
288288
/// statically generated up to size 32.
289289
///
290-
/// Arrays of *any* size are [`Copy`][copy] if the element type is `Copy`. This
291-
/// works because the `Copy` trait is specially known to the compiler.
290+
/// Arrays of *any* size are [`Copy`][copy] if the element type is [`Copy`][copy]. This
291+
/// works because the [`Copy`][copy] trait is specially known to the compiler.
292292
///
293293
/// Arrays coerce to [slices (`[T]`)][slice], so a slice method may be called on
294294
/// an array. Indeed, this provides most of the API for working with arrays.
@@ -297,23 +297,6 @@ mod prim_pointer { }
297297
/// There is no way to move elements out of an array. See [`mem::replace`][replace]
298298
/// for an alternative.
299299
///
300-
/// [slice]: primitive.slice.html
301-
/// [copy]: marker/trait.Copy.html
302-
/// [clone]: clone/trait.Clone.html
303-
/// [debug]: fmt/trait.Debug.html
304-
/// [intoiterator]: iter/trait.IntoIterator.html
305-
/// [partialeq]: cmp/trait.PartialEq.html
306-
/// [partialord]: cmp/trait.PartialOrd.html
307-
/// [eq]: cmp/trait.Eq.html
308-
/// [ord]: cmp/trait.Ord.html
309-
/// [hash]: hash/trait.Hash.html
310-
/// [asref]: convert/trait.AsRef.html
311-
/// [asmut]: convert/trait.AsMut.html
312-
/// [borrow]: borrow/trait.Borrow.html
313-
/// [borrowmut]: borrow/trait.BorrowMut.html
314-
/// [default]: default/trait.Default.html
315-
/// [replace]: mem/fn.replace.html
316-
///
317300
/// # Examples
318301
///
319302
/// ```
@@ -347,13 +330,31 @@ mod prim_pointer { }
347330
/// ```
348331
///
349332
/// If the array has 32 or fewer elements (see above), you can also use the
350-
/// array reference's `IntoIterator` implementation:
333+
/// array reference's [`IntoIterator`] implementation:
351334
///
352335
/// ```
353336
/// # let array: [i32; 3] = [0; 3];
354337
/// for x in &array { }
355338
/// ```
356339
///
340+
/// [slice]: primitive.slice.html
341+
/// [copy]: marker/trait.Copy.html
342+
/// [clone]: clone/trait.Clone.html
343+
/// [debug]: fmt/trait.Debug.html
344+
/// [intoiterator]: iter/trait.IntoIterator.html
345+
/// [partialeq]: cmp/trait.PartialEq.html
346+
/// [partialord]: cmp/trait.PartialOrd.html
347+
/// [eq]: cmp/trait.Eq.html
348+
/// [ord]: cmp/trait.Ord.html
349+
/// [hash]: hash/trait.Hash.html
350+
/// [asref]: convert/trait.AsRef.html
351+
/// [asmut]: convert/trait.AsMut.html
352+
/// [borrow]: borrow/trait.Borrow.html
353+
/// [borrowmut]: borrow/trait.BorrowMut.html
354+
/// [default]: default/trait.Default.html
355+
/// [replace]: mem/fn.replace.html
356+
/// [`IntoIterator`]: iter/trait.IntoIterator.html
357+
///
357358
#[stable(feature = "rust1", since = "1.0.0")]
358359
mod prim_array { }
359360

0 commit comments

Comments
 (0)