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.
This commit is contained in:
Mara Bos
2020-11-05 10:29:46 +01:00
committed by GitHub
2 changed files with 6 additions and 8 deletions

View File

@@ -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)*} => {