Skip to content

Add regression test for assoc const panic ICE in match - #160858

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
zakrad:regr-test-91514
Aug 11, 2026
Merged

Add regression test for assoc const panic ICE in match#160858
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
zakrad:regr-test-91514

Conversation

@zakrad

@zakrad zakrad commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Closes #91514, The associated const panic!() in a match used to ICE and now fails const eval cleanly

@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 Aug 10, 2026
@rustbot

rustbot commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

r? @JohnTitor

rustbot has assigned @JohnTitor.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 75 candidates
  • Random selection from 18 candidates

Comment on lines +1 to +6
//! Regression test for <https://github.com/rust-lang/rust/issues/91514>.
//!
//! An associated const initialized with `panic!()`, referenced from a `match` arm
//! with arms on both sides, used to ICE during codegen. It now fails const-eval
//! cleanly instead. The failure only surfaces on a full build (not `check`), since
//! the const is evaluated during codegen.

@qaijuang qaijuang Aug 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we use plain comment ?

Suggested change
//! Regression test for <https://github.com/rust-lang/rust/issues/91514>.
//!
//! An associated const initialized with `panic!()`, referenced from a `match` arm
//! with arms on both sides, used to ICE during codegen. It now fails const-eval
//! cleanly instead. The failure only surfaces on a full build (not `check`), since
//! the const is evaluated during codegen.
// Regression test for <https://github.com/rust-lang/rust/issues/91514>.
//
// An associated const initialized with `panic!()`, referenced from a `match` arm
// with arms on both sides, used to ICE during codegen. It now fails const-eval
// cleanly instead. The failure only surfaces on a full build (not `check`), since
// the const is evaluated during codegen.

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.

Done, thanks!
@rustbot ready

@JohnTitor JohnTitor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@rust-bors

rust-bors Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

📌 Commit aed6c87 has been approved by JohnTitor

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Aug 10, 2026
rust-bors Bot pushed a commit that referenced this pull request Aug 11, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #160629 ([Priroda] Add bootstrap test and check steps)
 - #160811 (Fix `visible_parent_map` fallback map merging perf regression)
 - #154329 (Diagnostics ICE when replaying proof trees with next-solver)
 - #157841 (Ensure inferred let pattern types are well-formed)
 - #159300 (Implement `to_string()` on `ByteStr` and `ByteString`)
 - #160858 (Add regression test for assoc const panic ICE in match)
 - #160864 (Rename `HostEffectPredicate` to `HostEffectClause`)
@rust-bors
rust-bors Bot merged commit 46f532d into rust-lang:main Aug 11, 2026
13 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Aug 11, 2026
rust-timer added a commit that referenced this pull request Aug 11, 2026
Rollup merge of #160858 - zakrad:regr-test-91514, r=JohnTitor

Add regression test for assoc const panic ICE in match

Closes #91514, The associated const panic!() in a match used to ICE and now fails const eval cleanly
github-actions Bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Aug 11, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#160629 ([Priroda] Add bootstrap test and check steps)
 - rust-lang/rust#160811 (Fix `visible_parent_map` fallback map merging perf regression)
 - rust-lang/rust#154329 (Diagnostics ICE when replaying proof trees with next-solver)
 - rust-lang/rust#157841 (Ensure inferred let pattern types are well-formed)
 - rust-lang/rust#159300 (Implement `to_string()` on `ByteStr` and `ByteString`)
 - rust-lang/rust#160858 (Add regression test for assoc const panic ICE in match)
 - rust-lang/rust#160864 (Rename `HostEffectPredicate` to `HostEffectClause`)
bjorn3 pushed a commit to bjorn3/stdarch that referenced this pull request Aug 13, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#160629 ([Priroda] Add bootstrap test and check steps)
 - rust-lang/rust#160811 (Fix `visible_parent_map` fallback map merging perf regression)
 - rust-lang/rust#154329 (Diagnostics ICE when replaying proof trees with next-solver)
 - rust-lang/rust#157841 (Ensure inferred let pattern types are well-formed)
 - rust-lang/rust#159300 (Implement `to_string()` on `ByteStr` and `ByteString`)
 - rust-lang/rust#160858 (Add regression test for assoc const panic ICE in match)
 - rust-lang/rust#160864 (Rename `HostEffectPredicate` to `HostEffectClause`)
@zakrad
zakrad deleted the regr-test-91514 branch August 15, 2026 09:02
pull Bot pushed a commit to LeeeeeeM/miri that referenced this pull request Aug 16, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#160629 ([Priroda] Add bootstrap test and check steps)
 - rust-lang/rust#160811 (Fix `visible_parent_map` fallback map merging perf regression)
 - rust-lang/rust#154329 (Diagnostics ICE when replaying proof trees with next-solver)
 - rust-lang/rust#157841 (Ensure inferred let pattern types are well-formed)
 - rust-lang/rust#159300 (Implement `to_string()` on `ByteStr` and `ByteString`)
 - rust-lang/rust#160858 (Add regression test for assoc const panic ICE in match)
 - rust-lang/rust#160864 (Rename `HostEffectPredicate` to `HostEffectClause`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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: thread 'rustc' panicked at 'assertion failed: (left == right) left: 2, right: 1', compiler/rustc_middle/src/mir/mod.rs:474:13

4 participants