Skip to content

Avoid unreachable_code on required return values#157009

Open
qaijuang wants to merge 2 commits into
rust-lang:mainfrom
qaijuang:unreachable-return-tail
Open

Avoid unreachable_code on required return values#157009
qaijuang wants to merge 2 commits into
rust-lang:mainfrom
qaijuang:unreachable-return-tail

Conversation

@qaijuang
Copy link
Copy Markdown
Contributor

@qaijuang qaijuang commented May 27, 2026

This PR skips return-place assignment plumbing when selecting user code to lint after an uninhabited call.

Fixes #152559

r? cjgillot

@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 May 27, 2026
@qaijuang qaijuang marked this pull request as ready for review May 27, 2026 10:28
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 27, 2026
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.

1.92.0 warns about unreachable code, but that code can't be removed without type errors

3 participants