Skip to content

fix ICE in opsem inhabitedness check#159570

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
RalfJung:inhabitedness
Jul 20, 2026
Merged

fix ICE in opsem inhabitedness check#159570
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
RalfJung:inhabitedness

Conversation

@RalfJung

@RalfJung RalfJung commented Jul 19, 2026

Copy link
Copy Markdown
Member

I feel like maybe #159560 should be avoided by not even trying to evaluate this constant... but anyway it makes sense to make this query tolerant to ty::Error IMO.

The error message we emit still makes no sense, but that's a separate issue and better than ICEing.

Fixes #159560
r? @oli-obk

@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 Jul 19, 2026
@RalfJung RalfJung changed the title fix ICE is opsem inhabitedness check fix ICE in opsem inhabitedness check Jul 19, 2026
@rust-log-analyzer

This comment has been minimized.

@oli-obk oli-obk left a comment

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.

r=me with redundant bug delay removed

View changes since this review

Comment thread compiler/rustc_middle/src/ty/inhabitedness/mod.rs Outdated
@rustbot rustbot 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-review Status: Awaiting review from the assignee but also interested parties. labels Jul 19, 2026
@oli-obk

oli-obk commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@rust-bors

rust-bors Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

📌 Commit ec05c7f has been approved by oli-obk

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 19, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 19, 2026
fix ICE in opsem inhabitedness check

I feel like maybe rust-lang#159560 should be avoided by not even trying to evaluate this constant... but anyway it makes sense to make this query tolerant to `ty::Error` IMO.

The error message we emit still makes no sense, but that's a separate issue and better than ICEing.

Fixes rust-lang#159560
r? @oli-obk
rust-bors Bot pushed a commit that referenced this pull request Jul 19, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #159188 (Always generate private and hidden items in JSON docs of the stdlib)
 - #159567 (Update rustc crate crossbeam-epoch to 0.9.20)
 - #150732 (Convert `-Ctarget-cpu` into a target-modifier for AVR, AMDGCN and NVPTX )
 - #151793 (Add mul_add_relaxed methods for floating-point types)
 - #159549 (restrict const-eval-related 'content' triggers to library/ folder)
 - #159570 (fix ICE in opsem inhabitedness check)
rust-bors Bot pushed a commit that referenced this pull request Jul 19, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #159188 (Always generate private and hidden items in JSON docs of the stdlib)
 - #159567 (Update rustc crate crossbeam-epoch to 0.9.20)
 - #150732 (Convert `-Ctarget-cpu` into a target-modifier for AVR, AMDGCN and NVPTX )
 - #159549 (restrict const-eval-related 'content' triggers to library/ folder)
 - #159570 (fix ICE in opsem inhabitedness check)
rust-bors Bot pushed a commit that referenced this pull request Jul 20, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #159188 (Always generate private and hidden items in JSON docs of the stdlib)
 - #159567 (Update rustc crate crossbeam-epoch to 0.9.20)
 - #150732 (Convert `-Ctarget-cpu` into a target-modifier for AVR, AMDGCN and NVPTX )
 - #159549 (restrict const-eval-related 'content' triggers to library/ folder)
 - #159570 (fix ICE in opsem inhabitedness check)
@rust-bors
rust-bors Bot merged commit 1271efe into rust-lang:main Jul 20, 2026
13 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 20, 2026
rust-timer added a commit that referenced this pull request Jul 20, 2026
Rollup merge of #159570 - RalfJung:inhabitedness, r=oli-obk

fix ICE in opsem inhabitedness check

I feel like maybe #159560 should be avoided by not even trying to evaluate this constant... but anyway it makes sense to make this query tolerant to `ty::Error` IMO.

The error message we emit still makes no sense, but that's a separate issue and better than ICEing.

Fixes #159560
r? @oli-obk
@RalfJung
RalfJung deleted the inhabitedness branch July 20, 2026 07:16
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]: Zextra-const-ub-checks: non-normalized type in is_opsem_uninhabited: {type error}

4 participants