Skip to content

hir_ty::match_check cleanup: remove special handling for box patterns #20175

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

Merged
merged 1 commit into from
Jul 6, 2025

Conversation

dianne
Copy link
Contributor

@dianne dianne commented Jul 5, 2025

As of rust-lang/rust#143414, as part of transitioning away from box patterns and towards more general deref patterns (rust-lang/rust#87121), box patterns are now represented in terms of deref patterns in the THIR and in match checking.

It doesn't seem like box patterns were lowered to the match_check IR to begin with though, so the handling of box patterns in match_check was dead code. Since it doesn't match with the compiler anymore and it wasn't used, I've removed it in this PR without replacement.

Once rust-lang/rust#143472 (or some successor thereof) is merged, it should be possible to properly implement match_check for deref patterns in rust-analyzer as well. I'd be happy to try doing so once syntax for deref patterns is sorted out.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 5, 2025
Copy link
Contributor

@ChayimFriedman2 ChayimFriedman2 left a comment

Choose a reason for hiding this comment

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

Thanks!

@ChayimFriedman2 ChayimFriedman2 added this pull request to the merge queue Jul 6, 2025
Merged via the queue into rust-lang:master with commit 694cd75 Jul 6, 2025
15 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants