Skip to content

fix for issue #7683 #7684

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 1 commit into from
Sep 30, 2021
Merged

fix for issue #7683 #7684

merged 1 commit into from
Sep 30, 2021

Conversation

surechen
Copy link
Contributor

@surechen surechen commented Sep 18, 2021

Fixes #7683.

For Repeat [x; y] (x is the type and y is the times to repeat) . When y > 32, the compiler will report an error:

https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=7148558162685e91056e0550797ea74c

Because https://github.com/rust-lang/rust/blob/6cdd42f9f8dd4e5e5ba0aa816bc4c99ab8b102f9/library/std/src/primitive_docs.rs#L538
/// Arrays of sizes from 0 to 32 (inclusive) implement [Default] trait
/// if the element type allows it. As a stopgap, trait implementations are
/// statically generated up to size 32.

So here to detect this situation.

changelog: [derivable_impls]: No longer lints when arrays bigger than 32 elements are involved

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @flip1995 (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Sep 18, 2021
@surechen surechen changed the title fir for issue #7683 fix for issue #7683 Sep 18, 2021
Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Could you squash your commits and provide a commit message that explains the change. Just referencing the issue number doesn't help much outside of GitHub.

@flip1995 flip1995 added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Sep 29, 2021
…dit method is_default_equivalent() to satisfy with this.
@surechen surechen force-pushed the solve_derivable_impls branch from e61be43 to a3d3735 Compare September 30, 2021 02:43
@surechen
Copy link
Contributor Author

Thanks! Could you squash your commits and provide a commit message that explains the change. Just referencing the issue number doesn't help much outside of GitHub.

Done. Thanks.

@flip1995
Copy link
Member

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Sep 30, 2021

📌 Commit a3d3735 has been approved by flip1995

@bors
Copy link
Contributor

bors commented Sep 30, 2021

⌛ Testing commit a3d3735 with merge ab99eec...

@bors
Copy link
Contributor

bors commented Sep 30, 2021

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing ab99eec to master...

@bors bors merged commit ab99eec into rust-lang:master Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

derivable_impls false positive on array sizes that do not implement Default
4 participants