-
Notifications
You must be signed in to change notification settings - Fork 13.4k
encode generics_of
for fields and ty params
#87815
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
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@bors r+ |
📌 Commit 8ff2ecc has been approved by |
r? @eddyb |
☀️ Test successful - checks-actions |
This change seems to have caused regressions (albeit fairly minor) in several real world crates such as diesel, serde, and futures. The regression seems to be happening in the As part of the performance triage process, I'm marking this as a performance regression. If you believe this performance regression to be justifiable or once you have an issue or PR that addresses this regression, please mark this PR with the label perf-regression-triaged. @rustbot label +perf-regression |
One workaround, since the behavior should be quite predictable, would be to have a single However, adding two levels of queries may itself cause additional inefficiencies, so perhaps a more straight-forward fix would be to make the cross-crate |
I investigated the suggested fix a little. It seems like it's probably not worth it for the small potential wins -- we'd have to do some pretty large scale refactoring, and for probably not that many DefKinds. It also seems uncertain that we'd end up winning -- decoding the largely empty generics should be pretty fast, I'd expect. And if we look at cycles:u, with the new significance calculations, not too many benchmarks actually regressed. So I'm going to say this is probably an acceptable loss for the time being, given the correctness fix. @rustbot label +perf-regression-triaged |
Fixes #87674
Fixes #87603
ICE was caused by calling
generics_of
on aDefId
without anygenerics_of
results. This was happening when we callgenerics_of
on parentDefId
s of an unevaluated const when we evaluate it.r? @lcnr