Skip to content

Fix regression when dealing with generics/values with unresolved inference#153790

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
zedddie:transmutation-regression
Mar 31, 2026
Merged

Fix regression when dealing with generics/values with unresolved inference#153790
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
zedddie:transmutation-regression

Conversation

@zedddie
Copy link
Copy Markdown
Contributor

@zedddie zedddie commented Mar 12, 2026

Follow up for #151703, fixing regression caused in rollup #152825

Forgot to handle generics & unresolved inference variables (as in get_safe_transmute_error_and_reason) in my previous PR. This followup checks for them before trying to normalize.

I am not completely sure its right approach to have this check cloned but as select_transmute_obligation_for_reporting fn just chooses obligation and doesn't actually return an error, this check shouldn't be removed from get_safe_transmute_error_and_reasnon. If there is any better solution, let me kmow.

Fixes: #153755

r? @jdonszelmann

@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 12, 2026
@jdonszelmann
Copy link
Copy Markdown
Contributor

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 30, 2026

📌 Commit fd45124 has been approved by jdonszelmann

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

Fix regression when dealing with generics/values with unresolved inference

Follow up for rust-lang#151703, fixing regression caused in rollup rust-lang#152825

Forgot to handle generics & unresolved inference variables (as in `get_safe_transmute_error_and_reason`) in my previous PR. This followup checks for them before trying to normalize.

I am not completely sure its right approach to have this check cloned but as `select_transmute_obligation_for_reporting` fn just chooses obligation and doesn't actually return an error, this check shouldn't be removed from `get_safe_transmute_error_and_reasnon`. If there is any better solution, let me kmow.

Fixes: rust-lang#153755

r? @jdonszelmann
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
…r=jdonszelmann

Fix regression when dealing with generics/values with unresolved inference

Follow up for rust-lang#151703, fixing regression caused in rollup rust-lang#152825

Forgot to handle generics & unresolved inference variables (as in `get_safe_transmute_error_and_reason`) in my previous PR. This followup checks for them before trying to normalize.

I am not completely sure its right approach to have this check cloned but as `select_transmute_obligation_for_reporting` fn just chooses obligation and doesn't actually return an error, this check shouldn't be removed from `get_safe_transmute_error_and_reasnon`. If there is any better solution, let me kmow.

Fixes: rust-lang#153755

r? @jdonszelmann
@tgross35
Copy link
Copy Markdown
Contributor

I think this may be related to #154625 (comment)?

@bors r-
@bors try jobs=aarch64-gnu-llvm-21-1

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

rust-bors bot commented Mar 31, 2026

This pull request was unapproved.

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

rust-bors bot pushed a commit that referenced this pull request Mar 31, 2026
Fix regression when dealing with generics/values with unresolved inference


try-job: aarch64-gnu-llvm-21-1
@rust-bors

This comment has been minimized.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 31, 2026

☀️ Try build successful (CI)
Build commit: e9bc2bc (e9bc2bce9d1a11287641d807d791a562e7907d3c, parent: 08cd08fbef8c6663b052d8d9e4930d5696cbb8a7)

@tgross35
Copy link
Copy Markdown
Contributor

Sorry about that, guess it's not this one

@bors r=jdonszelmann

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 31, 2026

📌 Commit fd45124 has been approved by jdonszelmann

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 Mar 31, 2026
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 68d2666 into rust-lang:main Mar 31, 2026
12 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 #153790 - zedddie:transmutation-regression, r=jdonszelmann

Fix regression when dealing with generics/values with unresolved inference

Follow up for #151703, fixing regression caused in rollup #152825

Forgot to handle generics & unresolved inference variables (as in `get_safe_transmute_error_and_reason`) in my previous PR. This followup checks for them before trying to normalize.

I am not completely sure its right approach to have this check cloned but as `select_transmute_obligation_for_reporting` fn just chooses obligation and doesn't actually return an error, this check shouldn't be removed from `get_safe_transmute_error_and_reasnon`. If there is any better solution, let me kmow.

Fixes: #153755

r? @jdonszelmann
github-actions bot pushed a commit to rust-lang/compiler-builtins that referenced this pull request Mar 31, 2026
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#154582 (miri subtree update)
 - rust-lang/rust#142659 (compiler-builtins: Clean up features)
 - rust-lang/rust#153574 (Avoid ICE when param-env normalization leaves unresolved inference variables)
 - rust-lang/rust#153648 (Fix EII function aliases eliminated by LTO)
 - rust-lang/rust#153790 (Fix regression when dealing with generics/values with unresolved inference)
 - rust-lang/rust#154551 (Skip suggestions pointing to macro def for assert_eq)
 - rust-lang/rust#154574 (delete several `ui/consts` tests)
 - rust-lang/rust#154577 (Update `mir-opt` 64-bit panic-abort tests for `Alignment` rename)
 - rust-lang/rust#154579 (remove debug requirement from hooks)
chenyukang pushed a commit to chenyukang/rust that referenced this pull request Apr 1, 2026
Rollup of 9 pull requests

Successful merges:

 - rust-lang#154582 (miri subtree update)
 - rust-lang#142659 (compiler-builtins: Clean up features)
 - rust-lang#153574 (Avoid ICE when param-env normalization leaves unresolved inference variables)
 - rust-lang#153648 (Fix EII function aliases eliminated by LTO)
 - rust-lang#153790 (Fix regression when dealing with generics/values with unresolved inference)
 - rust-lang#154551 (Skip suggestions pointing to macro def for assert_eq)
 - rust-lang#154574 (delete several `ui/consts` tests)
 - rust-lang#154577 (Update `mir-opt` 64-bit panic-abort tests for `Alignment` rename)
 - rust-lang#154579 (remove debug requirement from hooks)
RalfJung pushed a commit to RalfJung/miri that referenced this pull request Apr 1, 2026
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#154582 (miri subtree update)
 - rust-lang/rust#142659 (compiler-builtins: Clean up features)
 - rust-lang/rust#153574 (Avoid ICE when param-env normalization leaves unresolved inference variables)
 - rust-lang/rust#153648 (Fix EII function aliases eliminated by LTO)
 - rust-lang/rust#153790 (Fix regression when dealing with generics/values with unresolved inference)
 - rust-lang/rust#154551 (Skip suggestions pointing to macro def for assert_eq)
 - rust-lang/rust#154574 (delete several `ui/consts` tests)
 - rust-lang/rust#154577 (Update `mir-opt` 64-bit panic-abort tests for `Alignment` rename)
 - rust-lang/rust#154579 (remove debug requirement from hooks)
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]: should have resolved vars before calling when transmuting generic types

4 participants