Support -Z unpretty=thir-tree again#86251
Conversation
|
(rust-highfive has picked a reviewer for you, use r? to override) |
|
Can you add a test? It seems like this implementation would still have the steal issue as the new query isn't forced before the thir is stolen and steals the thir itself. |
|
@bjorn3 I've added a test. Stealing isn't an issue since the |
|
|
|
r? @oli-obk |
|
@LeSeulArtichaut |
|
One alternative would be to move the entire printing logic to |
|
@oli-obk Calling |
|
(This PR fixes #85552 as well) |
|
@bors r+ |
|
📌 Commit 51df26e has been approved by |
Support -Z unpretty=thir-tree again Currently `-Z unpretty=thir-tree` is broken after some THIR refactorings. This re-implements it, making it easier to debug THIR-related issues. We have to do analyzes before getting the THIR, since trying to create THIR from invalid HIR can ICE. But doing those analyzes requires the THIR to be built and stolen. We work around this by creating a separate query to construct the THIR tree string representation. Closes rust-lang/project-thir-unsafeck#8, fixes rust-lang#85552.
|
⌛ Testing commit 51df26e with merge 1e95f145157d48621d012352b3c46226f93548cb... |
|
💔 Test failed - checks-actions |
|
Is it me or are the logs unavailable? @bors retry |
|
☀️ Test successful - checks-actions |
Currently
-Z unpretty=thir-treeis broken after some THIR refactorings. This re-implements it, making it easier to debug THIR-related issues.We have to do analyzes before getting the THIR, since trying to create THIR from invalid HIR can ICE. But doing those analyzes requires the THIR to be built and stolen. We work around this by creating a separate query to construct the THIR tree string representation.
Closes rust-lang/project-thir-unsafeck#8, fixes #85552.