-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
write_mir_pretty no longer works for non local def_ids #81200
Comments
Cc @oli-obk |
I think what we can do is to check |
Can I working on this? |
That would be great. This is a blocker for me. |
It's all yours! You can use |
@rustbot claim |
If you need any help, don't hesitate to ask here or ping me on zulip. I'll respond whenever I have time (which is a bit flaky this week, but you should definitely get a response once a day) |
Sorry, I haven't had time to finish it lately. Let's see if others can help. |
Do we have a reproducer for this issue? I have some idea of what needs to be done here, but I don't know how to check if it really works. |
The only way I know of how to do this is to write something that uses the compiler driver, see for example: https://github.com/rust-lang/rustc-dev-guide/tree/master/examples. That seems like quite a lot of trouble to go to. More ideal would be some kind of unit test, but I have no idea of how that may be accomplished. Perhaps the easiest way to do an ad hoc test would be to build MIRAI with the latest nightly (I'd have to put up a branch that has been ported to it) and then run its tests. |
I've uploaded a draft PR to facebookexperimental/MIRAI#754. If you build that with a recent nightly and then run cargo test, you should see failures. If your fix is good, then all tests should pass. |
Thanks @hermanventer, that's very helpful. I was able to run the tests successfully using the master branch, but if I use my stage 1 build with your branch some of the tests fail, and the backtraces include |
The expect_local call here means that write_mir_pretty no longer works for non local def_ids. The ability to print out MIR for non local functions this way is critical for the MIRAI project.
Originally posted by @hermanventer in #78407 (comment)
The text was updated successfully, but these errors were encountered: