Skip to content
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

Fix FN in iter_cloned_collect with a large array #7138

Conversation

mgacek8
Copy link
Contributor

@mgacek8 mgacek8 commented Apr 26, 2021

fixes #6808
changelog: Fix FN in iter_cloned_collect with a large array

I spotted that is_iterable_array function that explicit_iter_loop lint is using only works for array sizes <= 32.
There is this comment:

IntoIterator is currently only implemented for array sizes <= 32 in rustc

I'm a bit confused, because I read that IntoIterator for arrays with const generic N is stable since = "1.0.0". Although Const Generics MVP were stabilized in Rust 1.51.

Should I set MSRV for the current change? I will try to test with older compilers soon.

@rust-highfive
Copy link

r? @Manishearth

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Apr 26, 2021
@Manishearth
Copy link
Member

IMO it's generally super rare to be using a larger array so this is fine for now

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 27, 2021

📌 Commit d7627dc has been approved by Manishearth

@bors
Copy link
Collaborator

bors commented Apr 27, 2021

⌛ Testing commit d7627dc with merge 9af07e6...

@bors
Copy link
Collaborator

bors commented Apr 27, 2021

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Manishearth
Pushing 9af07e6 to master...

@bors bors merged commit 9af07e6 into rust-lang:master Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FN: iter_cloned_collect with a large array
4 participants