Skip to content

feat: add diagnostic for E0529#22334

Merged
ChayimFriedman2 merged 1 commit intorust-lang:masterfrom
WaterWhisperer:diag-array-slice-pat
May 10, 2026
Merged

feat: add diagnostic for E0529#22334
ChayimFriedman2 merged 1 commit intorust-lang:masterfrom
WaterWhisperer:diag-array-slice-pat

Conversation

@WaterWhisperer
Copy link
Copy Markdown
Contributor

@WaterWhisperer WaterWhisperer commented May 10, 2026

Part of #22140

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 10, 2026
Comment thread crates/hir-ty/src/infer/pat.rs Outdated
Comment thread crates/hir-ty/src/mir/lower/pattern_matching.rs
Comment thread crates/hir-ty/src/infer/pat.rs Outdated
@WaterWhisperer WaterWhisperer force-pushed the diag-array-slice-pat branch from ec41883 to b9600b6 Compare May 10, 2026 09:40
Comment thread crates/hir-ty/src/infer/pat.rs Outdated
@WaterWhisperer WaterWhisperer force-pushed the diag-array-slice-pat branch from b9600b6 to 6012557 Compare May 10, 2026 11:26
}
Pat::Slice { prefix, slice, suffix } => {
// FIXME: MIR lowering should be skipped for bodies with inference errors. Otherwise
// invalid slice patterns can reach this code with an error type.
Copy link
Copy Markdown
Contributor

@ChayimFriedman2 ChayimFriedman2 May 10, 2026

Choose a reason for hiding this comment

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

I meant, still put the if, we need the tests after all, but also put the FIXME to remove it when we no longer lower MIR with errors.

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh, sorry for misunderstanding

@ChayimFriedman2
Copy link
Copy Markdown
Contributor

Ignore the CI failure; it happens sporadically (we need to figure out why).

@WaterWhisperer WaterWhisperer changed the title feat: add diagnostic for E0529 and E0730 feat: add diagnostic for E0529 May 10, 2026
@WaterWhisperer WaterWhisperer force-pushed the diag-array-slice-pat branch from 6012557 to 6c46dc6 Compare May 10, 2026 13:06
Copy link
Copy Markdown
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.

@ChayimFriedman2 ChayimFriedman2 added this pull request to the merge queue May 10, 2026
Merged via the queue into rust-lang:master with commit 8975dbc May 10, 2026
18 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 10, 2026
@WaterWhisperer WaterWhisperer deleted the diag-array-slice-pat branch May 10, 2026 13:43
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.

3 participants