-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Better error for HRTB error from generator interior #103171
Conversation
r? @cjgillot (rust-highfive has picked a reviewer for you, use r? to override) |
502c0f7
to
b47f345
Compare
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit b47f3458e8b1859ea9d15dbe3fd1e7850ac34b4f with merge d24c3df4273af3abc5a386905c589339b1b8477e... |
☀️ Try build successful - checks-actions |
Queued d24c3df4273af3abc5a386905c589339b1b8477e with parent 194140b, future comparison URL. |
Finished benchmarking commit (d24c3df4273af3abc5a386905c589339b1b8477e): comparison URL. Overall result: ❌ regressions - 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @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.
Footnotes |
b47f345
to
056bfe0
Compare
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 1c10a919f87a6a230239853a038a2d1abe74d484 with merge d7e1dc0229298b3f13ad956805b1db04248cf8f4... |
☀️ Try build successful - checks-actions |
Queued d7e1dc0229298b3f13ad956805b1db04248cf8f4 with parent a24a020, future comparison URL. |
Finished benchmarking commit (d7e1dc0229298b3f13ad956805b1db04248cf8f4): comparison URL. Overall result: ❌ regressions - 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @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.
Footnotes |
I think that's likely as good as we'll get here. We can no longer deduplicate as many types (and have to do two folds), so it's strictly more work. Given that this regression only happens in a single secondary benchmark, and the above statement, I'm going to mark the perf regression as triaged. |
TBH, I'm not really fond of adding a span to each Why doesn't the reported bug cause an error before region erasure? |
I considered giving then an optional
This is an interesting thought I hadn't considered. Thinking a bit about this, unless we construct that obligation in just the right way, it's going to be hard to trigger (and even then...). We specifically get this error because these are late-bound vars, that get turned into placeholders, that we normalize, and register a constraint for, that gets solved during borrowck. This is specifically difficult, because it's not the type being WF that's the problem, but the type being live across the await point. I don't think I'm doing a good job putting this into words. But essentially, it sounds reasonable, but I don't think it will actually work. Either because we don't know that we'll emit this error (because we don't know it will live across an await point), because we can't really construct an obligation that will emit the error but not run into the same problem (since we can't e.g. use a |
Looking a bit more to the test case, the error is a quirk of the way we bind lifetimes in the generator witness types. |
Yes, this PR should be able to be reverted once we no longer error for this. And that is likely going to come from implied bounds here. I can mention that this is a bug. |
In that case, r=me after rebase. |
…RTB error from generator interior
1c10a91
to
cececca
Compare
@bors r=cjgillot |
☀️ Test successful - checks-actions |
Finished benchmarking commit (bc2504a): comparison URL. Overall result: ❌ regressions - 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.
|
Is probably noise. @rustbot label: +perf-regression-triaged |
cc #100013
This is just a first pass at an error. It could be better, and shouldn't really be emitted in the first place. But this is better than what was being emitted before.