-
Notifications
You must be signed in to change notification settings - Fork 12
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
Minimal indexmap
support for rustc-rayon
#14
Conversation
For reference, here's how the impls currently look on the ... and they use the forwarding macros found here: So those are using |
[`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`.)
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
…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`.)
…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`.)
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`.)
…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`.)
Currently,
indexmap
has an optional "internal only" dependency onrustc-rayon
to implement parallel iterator support for use in the compiler. This PR flips that around to haverustc-rayon
implements those parallel iterators, soindexmap
doesn'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
Slice
API: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-rayon
also had by-valueIntoParallelIterator
implementations 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.