-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
incr.comp.: Fix HashStable for ty::RegionKind and trans item order #45176
incr.comp.: Fix HashStable for ty::RegionKind and trans item order #45176
Conversation
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.
Seems fine. I left a question, but I'll r+ in the meantime.
// the codegen tests and can even make item order | ||
// unstable. | ||
InstanceDef::Item(def_id) => { | ||
tcx.hir.as_local_node_id(def_id) |
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.
should we sort instead by def_id
?
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.
I'm not sure that DefIds
also reflect definition order. They probably do. This whole thing is a bit of a hack anyway. We could sort by Span
...
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.
DefIds do not reflect definition order, except in anonymous cases like impls. Otherwise, they would sort by name. Why do we care if these are reflect "definition order" per se?
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.
I makes writing the codegen tests a lot more pleasant if you know in which order things will appear in LLVM IR. You could of course also run the compiler once to find out what the order is but that's another hurdle to writing such tests. Also the tests might break if we changed the details of our symbol mangling (which we've done quite a few times). What we have now is "OK" in comparison, I think.
@bors r+ |
📌 Commit 1235836 has been approved by |
@bors p=1 Taking the liberty of bumping the priority of this since it will (hopefully) unbreak perf.rlo. |
…er, r=nikomatsakis incr.comp.: Fix HashStable for ty::RegionKind and trans item order Fixes #45161 and the failing rust-icci tests. r? @nikomatsakis
☀️ Test successful - status-appveyor, status-travis |
@michaelwoerister @nikomatsakis the bootstrap compiler update has bounced I believe due to #45161 and I think this PR is not currently in beta. Any objections to backporting this? |
No objections. |
Fixes #45161 and the failing rust-icci tests.
r? @nikomatsakis