-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Add default support for arrays of all sizes #106145
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @m-ou-se (or someone else) soon. Please see the contribution instructions for more information. |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
The job Click to see the possible cause of the failure (guessed by this bot)
|
@rustbot label +T-libs-api -T-libs |
@bors try |
@saeubank: 🔑 Insufficient privileges: not in try users |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am very skeptical that the library API team would be on board with breaking the [T; 0] impl. I'll go ahead and close this PR.
However, the team is interested in approaches that would allow arbitrarily large [T; N] to implement Default, as long as the 0 case continues to work as it currently does. This is already tracked in #61415.
Currently only arrays of up to size 32 support
Default
.This expands
Default
to be allowed for arrays of all sizes.rust-lang/libs-team#153