Skip to content

Avoid ICE when param-env normalization leaves unresolved inference variables#153574

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
TaKO8Ki:self-referential-param-env-normalization-ice
Mar 31, 2026
Merged

Avoid ICE when param-env normalization leaves unresolved inference variables#153574
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
TaKO8Ki:self-referential-param-env-normalization-ice

Conversation

@TaKO8Ki
Copy link
Copy Markdown
Member

@TaKO8Ki TaKO8Ki commented Mar 8, 2026

Fixes #153354

Because the impl is already ill-formed, those variables are not fully constrained, so zfully_resolvefails. We previously treated that as an immediate compiler bug withspan_bug!`, which caused an ICE on invalid input.

@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 Mar 8, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 8, 2026

r? @JonathanBrouwer

rustbot has assigned @JonathanBrouwer.
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 69 candidates
  • Random selection from 15 candidates

@rust-log-analyzer

This comment has been minimized.

@rustbot

This comment has been minimized.

@TaKO8Ki TaKO8Ki force-pushed the self-referential-param-env-normalization-ice branch from aeeca98 to c652d9d Compare March 8, 2026 18:14
@JonathanBrouwer
Copy link
Copy Markdown
Contributor

r? lcnr

@rustbot rustbot assigned lcnr and unassigned JonathanBrouwer Mar 8, 2026
Comment on lines 301 to 310
@@ -308,11 +308,10 @@ fn do_normalize_predicates<'tcx>(
//
// @lcnr: Let's still ICE here for now. I want a test case
// for that.
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.

sorry for the late review

please update this comment, r=me otherwise

#![allow(sized_hierarchy_migration)] //~ WARN unknown lint: `sized_hierarchy_migration`
#![feature(sized_hierarchy)] // added to keep parameters unconstrained

pub trait Foo<T: std::marker::PointeeSized> {
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.

please use #[rustc_no_implicit_bounds] instead of PointeeSized

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 30, 2026

This PR changes a file inside tests/crashes. If a crash was fixed, please move into the corresponding ui subdir and add 'Fixes #' to the PR description to autoclose the issue upon merge.

@TaKO8Ki TaKO8Ki force-pushed the self-referential-param-env-normalization-ice branch from a8f3a2a to 1df1c8a Compare March 30, 2026 12:58
@TaKO8Ki
Copy link
Copy Markdown
Member Author

TaKO8Ki commented Mar 30, 2026

@bors r=lcnr

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 30, 2026

📌 Commit 1df1c8a has been approved by lcnr

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 Mar 30, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 30, 2026
…-normalization-ice, r=lcnr

Avoid ICE when param-env normalization leaves unresolved inference variables

Fixes rust-lang#153354

Because the impl is already ill-formed, those variables are not fully constrained, so zfully_resolve` fails. We previously treated that as an immediate compiler bug with `span_bug!`, which caused an ICE on invalid input.
@rust-log-analyzer

This comment has been minimized.

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

@bors r-
#154584 (comment)

@rust-bors rust-bors bot 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 Mar 30, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 30, 2026

This pull request was unapproved.

This PR was contained in a rollup (#154584), which was unapproved.

avoid ICE on invalid param-env normalization

remove 120033 crash test

fix comments

use rustc_no_implicit_bounds

set #![allow(incomplete_features)]
@TaKO8Ki TaKO8Ki force-pushed the self-referential-param-env-normalization-ice branch from 1df1c8a to d29c489 Compare March 30, 2026 13:50
@TaKO8Ki
Copy link
Copy Markdown
Member Author

TaKO8Ki commented Mar 30, 2026

@bors r=lcnr

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 30, 2026

📌 Commit d29c489 has been approved by lcnr

It is now in the queue for this repository.

@rust-bors rust-bors bot added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 30, 2026
@rust-bors rust-bors bot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Mar 30, 2026
tgross35 added a commit to tgross35/rust that referenced this pull request Mar 30, 2026
…-normalization-ice, r=lcnr

Avoid ICE when param-env normalization leaves unresolved inference variables

Fixes rust-lang#153354

Because the impl is already ill-formed, those variables are not fully constrained, so zfully_resolve` fails. We previously treated that as an immediate compiler bug with `span_bug!`, which caused an ICE on invalid input.
rust-bors bot pushed a commit that referenced this pull request Mar 31, 2026
Rollup of 7 pull requests

Successful merges:

 - #142659 (compiler-builtins: Clean up features)
 - #153574 (Avoid ICE when param-env normalization leaves unresolved inference variables)
 - #153648 (Fix EII function aliases eliminated by LTO)
 - #153790 (Fix regression when dealing with generics/values with unresolved inference)
 - #153893 (Lex lifetimes as identifiers, recover from emoji and emit appropriate error)
 - #153980 (refactor: move doc(rust_logo) check to parser)
 - #154551 (Skip suggestions pointing to macro def for assert_eq)
rust-bors bot pushed a commit that referenced this pull request Mar 31, 2026
Rollup of 7 pull requests

Successful merges:

 - #142659 (compiler-builtins: Clean up features)
 - #153574 (Avoid ICE when param-env normalization leaves unresolved inference variables)
 - #153648 (Fix EII function aliases eliminated by LTO)
 - #153790 (Fix regression when dealing with generics/values with unresolved inference)
 - #153893 (Lex lifetimes as identifiers, recover from emoji and emit appropriate error)
 - #153980 (refactor: move doc(rust_logo) check to parser)
 - #154551 (Skip suggestions pointing to macro def for assert_eq)
tgross35 added a commit to tgross35/rust that referenced this pull request Mar 31, 2026
…-normalization-ice, r=lcnr

Avoid ICE when param-env normalization leaves unresolved inference variables

Fixes rust-lang#153354

Because the impl is already ill-formed, those variables are not fully constrained, so zfully_resolve` fails. We previously treated that as an immediate compiler bug with `span_bug!`, which caused an ICE on invalid input.
tgross35 added a commit to tgross35/rust that referenced this pull request Mar 31, 2026
…-normalization-ice, r=lcnr

Avoid ICE when param-env normalization leaves unresolved inference variables

Fixes rust-lang#153354

Because the impl is already ill-formed, those variables are not fully constrained, so zfully_resolve` fails. We previously treated that as an immediate compiler bug with `span_bug!`, which caused an ICE on invalid input.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 31, 2026
…-normalization-ice, r=lcnr

Avoid ICE when param-env normalization leaves unresolved inference variables

Fixes rust-lang#153354

Because the impl is already ill-formed, those variables are not fully constrained, so zfully_resolve` fails. We previously treated that as an immediate compiler bug with `span_bug!`, which caused an ICE on invalid input.
rust-bors bot pushed a commit that referenced this pull request Mar 31, 2026
Rollup of 9 pull requests

Successful merges:

 - #154582 (miri subtree update)
 - #142659 (compiler-builtins: Clean up features)
 - #153574 (Avoid ICE when param-env normalization leaves unresolved inference variables)
 - #153648 (Fix EII function aliases eliminated by LTO)
 - #153790 (Fix regression when dealing with generics/values with unresolved inference)
 - #154551 (Skip suggestions pointing to macro def for assert_eq)
 - #154574 (delete several `ui/consts` tests)
 - #154577 (Update `mir-opt` 64-bit panic-abort tests for `Alignment` rename)
 - #154579 (remove debug requirement from hooks)
@rust-bors rust-bors bot merged commit 3479a1d into rust-lang:main Mar 31, 2026
11 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 31, 2026
rust-timer added a commit that referenced this pull request Mar 31, 2026
Rollup merge of #153574 - TaKO8Ki:self-referential-param-env-normalization-ice, r=lcnr

Avoid ICE when param-env normalization leaves unresolved inference variables

Fixes #153354

Because the impl is already ill-formed, those variables are not fully constrained, so zfully_resolve` fails. We previously treated that as an immediate compiler bug with `span_bug!`, which caused an ICE on invalid input.
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]: inference variables in normalized parameter environment: unconstrained type

5 participants