-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Avoid reporting overflow in is_impossible_method
#100705
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
r? @jackh726 (rust-highfive has picked a reviewer for you, use r? to override) |
r? compiler |
Any chance to merge this soon, as this is currently blocking a diesel release? |
@bors r+ |
…i-obk Avoid reporting overflow in `is_impossible_method` Fixes rust-lang#100620 We're evaluating a new predicate in a different param-env than it was checked during typeck, so be more careful about handling overflow errors. Instead of using `FulfillmentCtxt`, using `InferCtxt::evaluate_obligation` by itself will give us back the overflow error, so we can throw it away properly. This may give us more false-positives, but it doesn't regress the `<HashMap as Iterator>::rev` example that originally motivated adding `is_impossible_method` in the first place.
@bors p=1 this is also causing errors on diesel perf runs, so bumping the prio a bit |
☀️ Test successful - checks-actions |
Finished benchmarking commit (983f4da): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression 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.
Footnotes |
The |
Ugh, seriously? I am just going to revert this is_impossible_method PR then until I can fix it correctly. 🤦 |
I'd be glad to be wrong, but the error is still there (this commit was already perf-tested) https://perf.rust-lang.org/status.html and when I tried |
Note: #100991 is tracking this and has some small additional context. |
The primary perf regression on this PR seems to be reversed by #101039, though given the nature of this PR being rustdoc specific, I wouldn't be surprised if it were just noise. Also that PR fixes the diesel doc issue. |
Marking this as triaged given the analysis above. @rustbot label: +perf-regression-triaged |
Fixes #100620
We're evaluating a new predicate in a different param-env than it was checked during typeck, so be more careful about handling overflow errors. Instead of using
FulfillmentCtxt
, usingInferCtxt::evaluate_obligation
by itself will give us back the overflow error, so we can throw it away properly.This may give us more false-positives, but it doesn't regress the
<HashMap as Iterator>::rev
example that originally motivated addingis_impossible_method
in the first place.