Skip to content

fix: Apply adjusts to pats and exprs when doing pat analysis #20273

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 21, 2025

Conversation

ShoyuVanilla
Copy link
Member

@ShoyuVanilla ShoyuVanilla commented Jul 21, 2025

Fixes #20259

rustc does pattern analysis with Thir, which uses adjusted exprs - apply_adjusts is false iff custom_mir attribute exists - and pats

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 21, 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.

Looks good, just one nit.

@ChayimFriedman2 ChayimFriedman2 added this pull request to the merge queue Jul 21, 2025
Merged via the queue into rust-lang:master with commit 9a1ee18 Jul 21, 2025
15 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 21, 2025
@ShoyuVanilla ShoyuVanilla deleted the match-adjusts branch July 21, 2025 17:01
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.

panicked at crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs:486:9
3 participants