File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -269,13 +269,18 @@ mod prim_pointer { }
269
269
/// - `Borrow`, `BorrowMut`
270
270
/// - `Default`
271
271
///
272
+ /// This limitation to `N in 0..33` exists because Rust does not yet support
273
+ /// generics over the size of an array type. `[Foo; 3]` and `[Bar; 3]` are
274
+ /// instances of same generic type `[T; 3]`, but `[Foo; 3]` and `[Foo; 5]` are
275
+ /// entirely different types. As a stopgap, trait implementations are
276
+ /// statically generated for `N in 0..33`.
277
+ ///
272
278
/// Arrays coerce to [slices (`[T]`)][slice], so their methods can be called on
273
- /// arrays.
279
+ /// arrays. Slices are dynamic and do not coerce to arrays; consequently more
280
+ /// methods are defined on `slice` where they support both types.
274
281
///
275
282
/// [slice]: primitive.slice.html
276
283
///
277
- /// Rust does not currently support generics over the size of an array type.
278
- ///
279
284
/// # Examples
280
285
///
281
286
/// ```
You can’t perform that action at this time.
0 commit comments