Minimal indexmap support for rustc-rayon#14
Merged
cuviper merged 2 commits intorust-lang:rustcfrom Jan 18, 2025
Merged
Conversation
Member
Author
|
For reference, here's how the impls currently look on the ... and they use the forwarding macros found here: So those are using |
cuviper
added a commit
to cuviper/rust
that referenced
this pull request
Jan 27, 2025
[`rustc-rayon v0.5.1`](rust-lang/rustc-rayon#14) added `indexmap` implementations that will allow `indexmap` to drop its own "internal-only" implementations. (This is separate from `indexmap`'s implementation for normal `rayon`.)
cuviper
added a commit
to cuviper/indexmap
that referenced
this pull request
Jan 27, 2025
While this looks like a breaking change, it was always documented in `Cargo.toml` as internal-only for use in the compiler: > Internal feature, only used when building as part of rustc, > not part of the stable interface of this crate. That's flipped around in [rustc-rayon#14] and [rust#136149]. [rustc-rayon#14]: rust-lang/rustc-rayon#14 [rust#136149]: rust-lang/rust#136149
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jan 28, 2025
…mpiler-errors Flip the `rustc-rayon`/`indexmap` dependency order [`rustc-rayon v0.5.1`](rust-lang/rustc-rayon#14) added `indexmap` implementations that will allow `indexmap` to drop its own "internal-only" implementations. (This is separate from `indexmap`'s implementation for normal `rayon`.)
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jan 28, 2025
…mpiler-errors Flip the `rustc-rayon`/`indexmap` dependency order [`rustc-rayon v0.5.1`](rust-lang/rustc-rayon#14) added `indexmap` implementations that will allow `indexmap` to drop its own "internal-only" implementations. (This is separate from `indexmap`'s implementation for normal `rayon`.)
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 28, 2025
Rollup merge of rust-lang#136149 - cuviper:rustc-rayon-indexmap, r=compiler-errors Flip the `rustc-rayon`/`indexmap` dependency order [`rustc-rayon v0.5.1`](rust-lang/rustc-rayon#14) added `indexmap` implementations that will allow `indexmap` to drop its own "internal-only" implementations. (This is separate from `indexmap`'s implementation for normal `rayon`.)
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Jan 29, 2025
…rors Flip the `rustc-rayon`/`indexmap` dependency order [`rustc-rayon v0.5.1`](rust-lang/rustc-rayon#14) added `indexmap` implementations that will allow `indexmap` to drop its own "internal-only" implementations. (This is separate from `indexmap`'s implementation for normal `rayon`.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently,
indexmaphas an optional "internal only" dependency onrustc-rayonto implement parallel iterator support for use in the compiler. This PR flips that around to haverustc-rayonimplements those parallel iterators, soindexmapdoesn't need to bother with this relatively niche use-case. If this is accepted and published, I intend to remove that "internal" dependency.These implementations are all straightforward with the
SliceAPI:impl<'a, K, V, S> IntoParallelIterator for &'a IndexMap<K, V, S>impl<'a, K, V, S> IntoParallelIterator for &'a mut IndexMap<K, V, S>impl<'a, T, S> IntoParallelIterator for &'a IndexSet<T, S>However,
indexmap/rustc-rayonalso had by-valueIntoParallelIteratorimplementations that are not feasible without direct access to their storage. Nothing in the compiler is currently using that though, so I think it's ok to drop it.