Skip to content

Conversation

chenyukang
Copy link
Member

@chenyukang chenyukang commented Oct 10, 2025

Fixes #141592

diverge is set here for never pattern in parameter:
https://github.com/rust-lang/rust/blob/master/compiler/rustc_hir_typeck/src/check.rs#L87-L90

the assertion is too strict, I set it delay as bug for later error.

@rustbot rustbot added 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. labels Oct 10, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 10, 2025

r? @jackh726

rustbot has assigned @jackh726.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@chenyukang chenyukang force-pushed the yukang-fix-ice-141592 branch from a427f3f to e7ed18b Compare October 10, 2025 09:51
@chenyukang chenyukang force-pushed the yukang-fix-ice-141592 branch from e7ed18b to ca8020a Compare October 10, 2025 10:01
@jackh726
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 14, 2025

📌 Commit ca8020a has been approved by jackh726

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 14, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 14, 2025
…r=jackh726

Fix ICE for never pattern as closure parameters

Fixes rust-lang#141592

`diverge` is set here for never pattern in parameter:
https://github.com/rust-lang/rust/blob/master/compiler/rustc_hir_typeck/src/check.rs#L87-L90

the assertion is too strict, I set it delay as bug for later error.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 14, 2025
…r=jackh726

Fix ICE for never pattern as closure parameters

Fixes rust-lang#141592

`diverge` is set here for never pattern in parameter:
https://github.com/rust-lang/rust/blob/master/compiler/rustc_hir_typeck/src/check.rs#L87-L90

the assertion is too strict, I set it delay as bug for later error.
bors added a commit that referenced this pull request Oct 14, 2025
Rollup of 12 pull requests

Successful merges:

 - #146277 (Enable `u64` limbs in `core::num::bignum`)
 - #146976 (constify basic Clone impls)
 - #147249 (Do two passes of `handle_opaque_type_uses_next`)
 - #147266 (fix 2 search graph bugs)
 - #147497 (`proc_macro` cleanups (3/N))
 - #147546 (Suppress unused_parens for labeled break)
 - #147548 (Fix ICE for never pattern as closure parameters)
 - #147594 (std: implement `pal::os::exit` for VEXos)
 - #147596 (Adjust the Arm targets in CI to reflect latest changes)
 - #147607 (GVN: Invalidate derefs at loop headers)
 - #147620 (Avoid redundant UB check in RangeFrom slice indexing)
 - #147647 (Hide vendoring and copyright in GHA group)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 0a7f159 into rust-lang:master Oct 14, 2025
10 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Oct 14, 2025
rust-timer added a commit that referenced this pull request Oct 14, 2025
Rollup merge of #147548 - chenyukang:yukang-fix-ice-141592, r=jackh726

Fix ICE for never pattern as closure parameters

Fixes #141592

`diverge` is set here for never pattern in parameter:
https://github.com/rust-lang/rust/blob/master/compiler/rustc_hir_typeck/src/check.rs#L87-L90

the assertion is too strict, I set it delay as bug for later error.
@Zalathar
Copy link
Contributor

Bors hasn't noticed that this was merged.

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

ICE: assertion failed: assert_eq!(self.diverges.get(), Diverges::Maybe) in rustc_hir_typeck/src/expr.rs

5 participants