Skip to content

Array trait impl comment/doc fixes #78716

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 5, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix outdated comment next to array_impl_default
The comment has become outdated as the array_impl macro
has been removed.
  • Loading branch information
est31 committed Nov 4, 2020
commit 93fa023111ddfa1997e32b117a3fff01c03c4db1
5 changes: 3 additions & 2 deletions library/core/src/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)*} => {
Expand Down