Skip to content

coverage: Remove an untested case for non-coroutine synthetic MIR - #162507

Draft
Zalathar wants to merge 1 commit into
rust-lang:mainfrom
Zalathar:synthetic
Draft

Zalathar wants to merge 1 commit into
rust-lang:mainfrom
Zalathar:synthetic

Conversation

@Zalathar

@Zalathar Zalathar commented Sep 9, 2026

Copy link
Copy Markdown
Member

This special case was originally added in #131802 to avoid an ICE. It was later refined in #156970 to use ty::Coroutine(coroutine_def_id, _) instead if possible.

From what I can tell, that refinement made the original special case unreachable. Certainly it cannot be hit by any existing coverage tests, including the regression test added by #131802. And given the need for the refinement in #156970, it's unclear whether the fallback case would even be correct if it were reachable.

There's a small chance that we end up having to revert this PR, if it does lead to a reported ICE in currently-unknown circumstances. But if that happens, then hopefully we'll at least have a repro to add to the test suite.

@Zalathar Zalathar added the A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) label Sep 9, 2026
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 9, 2026
@Zalathar

Zalathar commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

(Currently a draft because after typing out the description, I'm thinking it might be better to come up with a more “fail-safe” version of this change, but doing so would be more involved.)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

2 participants