[WIP] Remove allow(rustc::potential_query_instability) in rustc_session#99065
[WIP] Remove allow(rustc::potential_query_instability) in rustc_session#99065NiklasJonsson wants to merge 1 commit intorust-lang:masterfrom
Conversation
Replace a use of FxHashMap with FxIndexMap
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cjgillot (or someone else) soon. Please see the contribution instructions for more information. |
| pub fn merge(&self, mut spans: FxIndexMap<Symbol, Vec<Span>>) { | ||
| let mut inner = self.spans.borrow_mut(); | ||
| for (gate, mut gate_spans) in inner.drain() { | ||
| for (gate, mut gate_spans) in inner.drain(..) { |
There was a problem hiding this comment.
As this just puts the contents of the drained hashmap into another one, I don't see a way that the iteration order can affect the resulting map, so we could also add a local allow here but replacing the map seemed preferable. Though, I'm not sure if this has any performance implications.
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
This wasn't as ready as I thought, @rustbot label -S-waiting-on-review |
|
which seems fine enough as it just creates a new hashmap in-place with the mapped values and keys, assuming which makes use of |
FWIW I think it would be fine to add that API to IndexMap |
Yeah I figured but I didn't want to leave this PR in limbo here until that is done (possibly by me). |
|
|
|
Can IndexMap add it under a |
Replace a use of FxHashMap with FxIndexMap
Relates #84447
Haven't contributed before so not 100 % sure of who to ask for a review but
r? @cjgillot
seems reasonable as you commented last on the issue 😄