-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Remove Const::ty and Const::kind in favor of field accesses via Deref #104894
Conversation
…e `Ty` fields without the helper method
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jackh726 (or someone else) soon. Please see the contribution instructions for more information. |
Some changes occurred in need_type_info.rs cc @lcnr Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred in const_evaluatable.rs cc @lcnr Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
|
I think the |
yea, the |
Hey, so I just removed TyS without a loss in usability or anything else: #104898 |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit f647045 with merge 0d98fecdb93008583f0446838c452782a71a2dc0... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (0d98fecdb93008583f0446838c452782a71a2dc0): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking 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 Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
|
This is opposite to the direction we were trying to go for librarification. In Chalk, for example, we deal with interned things behind associated types on |
I thought we only needed that for That said, why can't we also use deref for chalk to get the assoc type? |
If your interner uses indices. However, I don't understand why the syntax there isn't e.g. |
cc @nnethercote
also rename
ConstS
toConstData
as a) I don't know what the S postfix means b) the *Data naming is what I use for the effects, too and c) rust-analyzer also usesConstData
for the same datastructure