-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Move RegionKind to rustc_type_ir #98247
Conversation
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 1e9f8df with merge 4d6ba22fc03b88084f993c67596efbdcf8b0c96d... |
Looks great! I'll give it another look-over once perf gets back and CI looks green, but glad to see that this was a much simpler move than migrating TyKind. |
So much simpler! The worst part was writing the impls 🙃 |
Oh, did you write them by hand? When I made them for TyKind, I just got them from cargo-expand + a lot of string replacement to clean them up. If you did write them by hand, I'll make sure to give them a particularly close looking over for correctness. |
Yeah, I did. Probably would have been roughly the same time to do the other way. |
☀️ Try build successful - checks-actions |
Queued 4d6ba22fc03b88084f993c67596efbdcf8b0c96d with parent 3b98c08, future comparison URL. |
Finished benchmarking commit (4d6ba22fc03b88084f993c67596efbdcf8b0c96d): comparison url. Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Footnotes |
// This is manually implemented because a derive would require `I: Copy` | ||
impl<I: Interner> Copy for RegionKind<I> |
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.
Does it matter that derive
would introduce that bound? In chalk, Copy
is a supertrait of Interner
; and in rustc, isn't I
just a shared ref to the type context (which therefore is indeed Copy
)?
I guess the same should apply for Clone
even though it is not strictly a supertrait of Interner
? After all, requiring I: Clone
shouldn't be restrictive if we know that I: Copy
.
As an aside, I wonder whether there wouldn't be some ergonomic benefit to using a derivative
-like macro here to workaround #26925 without requiring all these manual impls?
@bors r+ 🎉 |
📌 Commit 1e9f8df has been approved by |
☀️ Test successful - checks-actions |
…compiler-errors Move RegionKind to rustc_type_ir (Also UniverseIndex) r? rust-lang/types
Finished benchmarking commit (bb8c2f4): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
Rustup to rust-lang/rust#98247 Closes #320 Signed-off-by: Yuki Okushi <jtitor@2k36.org>
(Also UniverseIndex)
r? rust-lang/types