about summary refs log tree commit diff
path: root/library/core/src/array
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2020-11-05 10:29:46 +0100
committerGitHub <noreply@github.com>2020-11-05 10:29:46 +0100
commit43e1b58bccf7e62bcccfd1ce0bedc9dc65df3564 (patch)
tree48fd373b32783ca019b40de23052cea3e0af9c5d /library/core/src/array
parentcbf74bc4ca3f9a3b17af672930c56fa25861b21e (diff)
parent93fa023111ddfa1997e32b117a3fff01c03c4db1 (diff)
downloadrust-43e1b58bccf7e62bcccfd1ce0bedc9dc65df3564.tar.gz
rust-43e1b58bccf7e62bcccfd1ce0bedc9dc65df3564.zip
Rollup merge of #78716 - est31:array_traits, r=Dylan-DPC
Array trait impl comment/doc fixes

Two small doc/comment fixes regarding trait implementations on arrays.
Diffstat (limited to 'library/core/src/array')
-rw-r--r--library/core/src/array/mod.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs
index 1d55a5ef659..123a191dd2c 100644
--- a/library/core/src/array/mod.rs
+++ b/library/core/src/array/mod.rs
@@ -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)*} => {