-
Notifications
You must be signed in to change notification settings - Fork 13k
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
do not eagerly use Reveal::All
in const_eval_resolve_for_typeck
#132418
Conversation
we should not use `RevealAll` when resolving the instance only when evaluating its body.
Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
do not eagerly use `Reveal::All` in `const_eval_resolve_for_typeck` We should not use `RevealAll` when resolving the instance; only when evaluating its body. r? `@BoxyUwU`
// | ||
// In case the query key would contain unconstrained inference variables, we bail instead. | ||
if (unevaluated, param_env).has_non_region_infer() { | ||
return Err(Either::Right(ErrorHandled::TooGeneric(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.
anything that cares about infer vars should use infcx.try_const_eval_resolve
:<
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (8b79e04): comparison URL. Overall result: ❌ regressions - please read the text belowBenchmarking 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResults (secondary -6.1%)This 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 784.059s -> 782.369s (-0.22%) |
I like the general cleanup in this PR though I think it (unfortunately) makes sense to continue using a Since getting an instance of an anon const will trivially succeed regardless of if it contains any opaque types, that means that not using One thing we could do to avoid that would be to not reveal opaque types during ctfe in typeck but that seems like a far wider change (and also one that is perhaps not super desirable). |
this is kinda irrelevant now that #132927 has landed, closing |
We should not use
RevealAll
when resolving the instance; only when evaluating its body.r? @BoxyUwU