Skip to content

Conversation

@lapla-cogito
Copy link
Contributor

@lapla-cogito lapla-cogito commented Nov 22, 2025

fixes #141400, fixes #148809

An ICE occurs when using std::mem::TransmuteForm for trait resolution when it contains inferred variables. This can be resolved by adding an early return condition to is_transmutable. However, since most existing type resolution appears to be handled by rustc_transmute::TransmuteTypeEnv, I've added a guard that only applies when non-regional inference variables remain.

@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 Nov 22, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 22, 2025

r? @lcnr

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

@lcnr
Copy link
Contributor

lcnr commented Nov 24, 2025

It seems wrong to return an error here. It should not be impossible to transmute. We should instead stall somehow here. There should probably just be an Answer::Maybe or sth to deal with cases where there are still inference variable to get the trait solver to try again later

@lcnr lcnr 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 Nov 26, 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: compiler paniced and panicked while processing panic, program terminated with signal: SIGSEGV ICE: layout_of: unexpected type

3 participants