diff options
| author | bors <bors@rust-lang.org> | 2020-07-26 05:50:51 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-07-26 05:50:51 +0000 |
| commit | 461707c5a119cc33c5d7df585ddb6cbec4a081bf (patch) | |
| tree | 24a677c43e50736f6028e26d8cfecb6ee9eb8f49 /src/libstd | |
| parent | a4dd850720369d9e5b9df91820b23cddb2badc06 (diff) | |
| parent | 8fc7d47c8c43dab634aff15908ab42ca056dda07 (diff) | |
| download | rust-461707c5a119cc33c5d7df585ddb6cbec4a081bf.tar.gz rust-461707c5a119cc33c5d7df585ddb6cbec4a081bf.zip | |
Auto merge of #74060 - kpp:remove_length_at_most_32, r=dtolnay
Remove trait LengthAtMost32 This is a continuation of https://github.com/rust-lang/rust/pull/74026 preserving the original burrbull's commit. I talked to @burrbull, he suggested me to finish his PR.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/primitive_docs.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/libstd/primitive_docs.rs b/src/libstd/primitive_docs.rs index e0ceb9f3f38..86de509e80a 100644 --- a/src/libstd/primitive_docs.rs +++ b/src/libstd/primitive_docs.rs @@ -460,8 +460,7 @@ mod prim_pointer {} /// * A repeat expression `[x; N]`, which produces an array with `N` copies of `x`. /// The type of `x` must be [`Copy`][copy]. /// -/// Arrays of sizes from 0 to 32 (inclusive) implement the following traits if -/// the element type allows it: +/// Arrays of *any* size implement the following traits if the element type allows it: /// /// - [`Debug`][debug] /// - [`IntoIterator`][intoiterator] (implemented for `&[T; N]` and `&mut [T; N]`) @@ -469,12 +468,9 @@ mod prim_pointer {} /// - [`Hash`][hash] /// - [`AsRef`][asref], [`AsMut`][asmut] /// - [`Borrow`][borrow], [`BorrowMut`][borrowmut] -/// - [`Default`][default] /// -/// This limitation on the size `N` exists because Rust does not yet support -/// code that is generic over the size of an array type. `[Foo; 3]` and `[Bar; 3]` -/// are instances of same generic type `[T; 3]`, but `[Foo; 3]` and `[Foo; 5]` are -/// entirely different types. As a stopgap, trait implementations are +/// Arrays of sizes from 0 to 32 (inclusive) implement [`Default`][default] trait +/// if the element type allows it. 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] @@ -521,8 +517,7 @@ mod prim_pointer {} /// for x in array.iter() { } /// ``` /// -/// If the array has 32 or fewer elements (see above), you can also use the -/// array reference's [`IntoIterator`] implementation: +/// You can also use the array reference's [`IntoIterator`] implementation: /// /// ``` /// # let array: [i32; 3] = [0; 3]; |
