Skip to content

Conversation

@mu001999
Copy link
Contributor

@mu001999 mu001999 commented Jan 18, 2026

Fixes #151251

With feature generic_const_exprs enabled, consts with #[type_const] won't be normalized even if they need. Then ICE happens when CTFE tries to evaluate such const without body.

Fix this by normalizing such consts even with feature generic_const_exprs enabled.

r? @BoxyUwU

@rustbot
Copy link
Collaborator

rustbot commented Jan 18, 2026

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

@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 Jan 18, 2026
@mu001999 mu001999 marked this pull request as draft January 18, 2026 02:10
@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 Jan 18, 2026
@mu001999 mu001999 changed the title Return evaluated type-const when eval_to_valtree Normalize type_const items even with feature generic_const_exprs Jan 18, 2026
@rust-log-analyzer

This comment has been minimized.

@mu001999 mu001999 marked this pull request as ready for review January 18, 2026 06:11
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ICE: CTFE tried to evaluate type-const (cyclic type_const)

4 participants