]> git.proxmox.com Git - rustc.git/blobdiff - library/core/src/array/mod.rs
New upstream version 1.49.0~beta.4+dfsg1
[rustc.git] / library / core / src / array / mod.rs
index 966272ca115491005ba2747be6cd067b207023d1..123a191dd2cc2fb88be44db5daa5eede8fa1edd9 100644 (file)
@@ -344,7 +344,7 @@ impl<T: PartialOrd, const N: usize> PartialOrd for [T; N] {
     }
 }
 
-/// Implements comparison of arrays lexicographically.
+/// Implements comparison of arrays [lexicographically](Ord#lexicographical-comparison).
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T: Ord, const N: usize> Ord for [T; N] {
     #[inline]
@@ -353,8 +353,9 @@ impl<T: Ord, const N: usize> Ord for [T; N] {
     }
 }
 
-// The Default impls cannot be generated using the array_impls! macro because
-// they require array literals.
+// The Default impls cannot be done with const generics because `[T; 0]` doesn't
+// require Default to be implemented, and having different impl blocks for
+// different numbers isn't supported yet.
 
 macro_rules! array_impl_default {
     {$n:expr, $t:ident $($ts:ident)*} => {