Add rustc_index::StableIdx - #162731
Add rustc_index::StableIdx#162731susitsm wants to merge 1 commit into
rustc_index::StableIdx#162731Conversation
`StableIdx` is for index types where iteration is stable between runs. Allows usage of iterator functions for `IndexVec` and `IndexSlice`. Otherwise only the `unstable_*` variants of these functions is available
|
Some changes occurred in coverage instrumentation. cc @Zalathar Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred in exhaustiveness checking cc @Nadrieril |
|
rustbot has assigned @hanna-kruppe. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
Zulip thread for background: #t-compiler/const-eval > DefId reproducibility with the parallel frontend |
|
I don't feel good about this approach, as it:
|
|
I understand where you are coming from. Maybe a better solution could be to simply remove It is also possible to simply gate iteration behind |
This might be a good thing? Like it or not, stable iteration IS something you should think about when creating a new index type, when using maps. Not doing so results in bugs. So as fundamental as |
|
@rustbot reroll |
|
I think the more promising approach is to try to make LocalDefId not implement That will probably be more intrusive to code currently relying on the impl, but less intrusive to all the other code relying on integration between |
|
I'm finishing up GSoC this weekend, so it's probably better if someone else looks into this @rustbot release-assignment |
StableIdxis forIdxtypes where iteration is stable between runs. Allows usage of iterator functions forIndexVecandIndexSlice. Otherwise only theunstable_*variants of these functions is availableThis is related to #162202 and #162203 and #90317