Skip to content

Add a method to dump MIR in the middle of MIR building #144780

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Aug 1, 2025

This makes it easier to debug issues with MIR building by inserting dump_for_debugging calls around the suspected code responsible for the bad MIR.

This makes it easier to debug issues with MIR building by inserting
dump_for_debugging calls around the suspected code responsible for the
bad MIR.
@rustbot
Copy link
Collaborator

rustbot commented Aug 1, 2025

r? @petrochenkov

rustbot has assigned @petrochenkov.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 1, 2025
@bjorn3
Copy link
Member Author

bjorn3 commented Aug 1, 2025

I used this while debugging a loop match issue with @folkertdev. I figured it could be useful for others too in the future.

self.coroutine.clone(),
None,
);
//body.coverage_info_hi = self.coverage_info.clone().map(|b| b.into_done());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The coverage info builder is not Clone and I'm not sure if we should implement Clone for it anyway..

@petrochenkov
Copy link
Contributor

r? mir

@rustbot rustbot assigned matthewjasper and unassigned petrochenkov Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants