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
[WIP] Rewrite handling of universe-leaking placeholder regions into outlives constraints #123720
base: master
Are you sure you want to change the base?
Conversation
r? @davidtwco rustbot has assigned @davidtwco. Use |
(it's not 100% ready for review yet probably maybe, but I figured I might as well start the PR now) |
This comment has been minimized.
This comment has been minimized.
the syntax is r? nikomatsakis 😆 |
That’s funny because I tried that first, thought I made a mistake, and went back to “fix” it |
Update: I had a brainwave during my investigations of the failing UI tests (there's 20-ish of them if you enable the new logic everywhere, depending on whether you count duplicates). I tried adding a new constraint category so that I could easily not blame it (ever, actually), and that reduces the errors down to one, tiny span diff:
I'm pretty confident this works now. Removing the WIP label! |
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.
Efficiency nit
I think it's ready for a perf run, @lqd! |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…=<try> Rewrite handling of universe-leaking placeholder regions into outlives constraints This commit prepares for Polonius by moving handling of leak check/universe errors out of the inference step by rewriting any universe error into an outlives-static constraint. This variant is a work in progress but seems to pass most tests. Note that a few debug assertions no longer hold; a few extra eyes on those changes are appreciated!
This comment has been minimized.
This comment has been minimized.
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.
OK, so, I reviewed and left a (tiny) nit. I don't know that a perf run is really needed, this is pretty clearly grossly inefficient. That's precisely what I expected, of course.
r=me but I'd like to hand this off to somebody else to drive over the finish line
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (1b9e1e6): 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 Warning ⚠: The following benchmark(s) failed to build:
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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: missing data |
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #124015) made this pull request unmergeable. Please resolve the merge conflicts. |
This commit prepares for Polonius by moving handling of leak check/universe errors out of the inference step by rewriting any universe error into an outlives-static constraint. This variant is a work in progress. Note that a few debug assertions no longer hold; a few extra eyes on those changes are appreciated! Add a new constraint category for our outlives static constraints This makes the origin of these synthetic constraints clearer and allows us to make sure that they are literally never blamed during error reporting, massively reducing the number of failing UI tests. In addition, this commit contains a few drive-by refactors, in particular of debug printing.
d269d50
to
9674cee
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This is clearly buggy (I get 24 test failures, out of which 9 are clearly serious), but it's a start.
This comment has been minimized.
This comment has been minimized.
This is a bit inelegant, but works for now.
This comment has been minimized.
This comment has been minimized.
The job Click to see the possible cause of the failure (guessed by this bot)
|
☔ The latest upstream changes (presumably #124558) made this pull request unmergeable. Please resolve the merge conflicts. |
This commit prepares for Polonius by moving handling of leak check/universe errors out of the inference step by rewriting any universe error into an outlives-static constraint.
This variant is a work in progress but seems to pass most tests.
Note that a few debug assertions no longer hold; a few extra eyes on those changes are appreciated!