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

Use slice::iter instead of into_iter to avoid future breakage #162

Merged
merged 1 commit into from
Jan 13, 2020
Merged

Use slice::iter instead of into_iter to avoid future breakage #162

merged 1 commit into from
Jan 13, 2020

Conversation

LukasKalbertodt
Copy link
Member

lazy_static 1.1.0 is already quite old, but for some reason some creates have a ~1.1.0 version requirement. As a consequence, quite a few crates still have lazy_static 1.1.0 in their dependency tree. That particular version regresses with rust-lang/rust#65819, as array.into_iter() is used in the build script. This report says that lazy_static 1.1.0 causes roughly 800 other crates to regress.

Ideally all crates would upgrade to a newer lazy_static, but that might now happen. Therefore my idea: release 1.1.1 with this tiny change. It does not require a newer Rust compiler version and fixes a bunch of crates. What do you think?

(PS: the PR targeting master is obviously wrong. I just wanted to create this PR for some discussion about this. If everyone agrees we should release 1.1.1, I can manually "merge" this into the main repo)

`an_array.into_iter()` currently just works because of the autoref
feature, which then calls `<[T] as IntoIterator>::into_iter`. But
in the future, arrays will implement `IntoIterator`, too. In order
to avoid problems in the future, the call is replaced by `iter()`
which is shorter and more explicit.
@KodrAus
Copy link
Contributor

KodrAus commented Jan 13, 2020

This seems reasonable to me, it's probably inevitable that we'd need to track small patches to minor releases.

I've gone ahead and set up a release/1.1 branch from 19b57ec that we can target this to.

@LukasKalbertodt LukasKalbertodt changed the base branch from master to release/1.1 January 13, 2020 09:07
@KodrAus KodrAus merged commit a7d9979 into rust-lang-nursery:release/1.1 Jan 13, 2020
@LukasKalbertodt LukasKalbertodt deleted the fix-array-into-iter branch January 14, 2020 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants