-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
[WIP] Remove allow(rustc::potential_query_instability) in rustc_session #99065
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. |
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 😄