Skip to content

Treat normalizing consts like normalizing types in deeply normalize #142126

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Jun 8, 2025

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Jun 6, 2025

...so that we don't end up putting a top-level normalizes-to goal in the fulfillment context, which ICEs. This basically just models the normalize-const code off of the normalize-ty code above it, which uses an alias-relate goal instead.

Fixes #140571

r? lcnr

@compiler-errors compiler-errors marked this pull request as ready for review June 6, 2025 17:11
@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 6, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 6, 2025

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

@BoxyUwU
Copy link
Member

BoxyUwU commented Jun 6, 2025

Would it make sense to have a normalize_alias_term function and share the logic between the two methods so that we're not maintaining what is conceptually the exact same logic twice

Copy link
Member

@BoxyUwU BoxyUwU left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want a review from lcnr specifically?

@compiler-errors compiler-errors force-pushed the normalize-uv-via-relate branch from ecd4929 to aa1b296 Compare June 7, 2025 02:35
@compiler-errors
Copy link
Member Author

Do you want a review from lcnr specifically?

Nah, was just assigning to them out of habit lol. ty for the review and feel free to approve if you want.

@BoxyUwU
Copy link
Member

BoxyUwU commented Jun 7, 2025

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 7, 2025

📌 Commit aa1b296 has been approved by BoxyUwU

It is now in the queue for this repository.

@bors bors 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 Jun 7, 2025
@BoxyUwU
Copy link
Member

BoxyUwU commented Jun 7, 2025

r? @BoxyUwU

@rustbot rustbot assigned BoxyUwU and unassigned lcnr Jun 7, 2025
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jun 7, 2025
…elate, r=BoxyUwU

Treat normalizing consts like normalizing types in deeply normalize

...so that we don't end up putting a top-level normalizes-to goal in the fulfillment context, which ICEs. This basically just models the normalize-const code off of the normalize-ty code above it, which uses an alias-relate goal instead.

Fixes rust-lang#140571

r? lcnr
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Jun 7, 2025
…elate, r=BoxyUwU

Treat normalizing consts like normalizing types in deeply normalize

...so that we don't end up putting a top-level normalizes-to goal in the fulfillment context, which ICEs. This basically just models the normalize-const code off of the normalize-ty code above it, which uses an alias-relate goal instead.

Fixes rust-lang#140571

r? lcnr
bors added a commit that referenced this pull request Jun 7, 2025
Rollup of 14 pull requests

Successful merges:

 - #138062 (Enable Non-determinism of float operations in Miri and change std tests )
 - #140560 (Allow `#![doc(test(attr(..)))]` everywhere)
 - #141001 (Make NonZero<char> possible)
 - #141295 (Stabilize `if let` guards (`feature(if_let_guard)`))
 - #141435 (Add (back) `unsupported_calling_conventions` lint to reject more invalid calling conventions)
 - #141447 (Document representation of `Option<unsafe fn()>`)
 - #142008 (const-eval error: always say in which item the error occurred)
 - #142053 (Add new Tier-3 targets: `loongarch32-unknown-none*`)
 - #142065 (Stabilize `const_eq_ignore_ascii_case`)
 - #142116 (Fix bootstrap tracing imports)
 - #142126 (Treat normalizing consts like normalizing types in deeply normalize)
 - #142140 (compiler: Sort and doc ExternAbi variants)
 - #142148 (compiler: Treat ForceWarning as a Warning for diagnostic level)
 - #142154 (get rid of spurious cfg(bootstrap))

r? `@ghost`
`@rustbot` modify labels: rollup
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jun 7, 2025
…elate, r=BoxyUwU

Treat normalizing consts like normalizing types in deeply normalize

...so that we don't end up putting a top-level normalizes-to goal in the fulfillment context, which ICEs. This basically just models the normalize-const code off of the normalize-ty code above it, which uses an alias-relate goal instead.

Fixes rust-lang#140571

r? lcnr
bors added a commit that referenced this pull request Jun 7, 2025
Rollup of 9 pull requests

Successful merges:

 - #140560 (Allow `#![doc(test(attr(..)))]` everywhere)
 - #141447 (Document representation of `Option<unsafe fn()>`)
 - #141661 (Make the `dangerous_implicit_autorefs` lint deny-by-default)
 - #142065 (Stabilize `const_eq_ignore_ascii_case`)
 - #142116 (Fix bootstrap tracing imports)
 - #142126 (Treat normalizing consts like normalizing types in deeply normalize)
 - #142140 (compiler: Sort and doc ExternAbi variants)
 - #142148 (compiler: Treat ForceWarning as a Warning for diagnostic level)
 - #142154 (get rid of spurious cfg(bootstrap))

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7c3cb56 into rust-lang:master Jun 8, 2025
10 checks passed
@rustbot rustbot added this to the 1.89.0 milestone Jun 8, 2025
rust-timer added a commit that referenced this pull request Jun 8, 2025
Rollup merge of #142126 - compiler-errors:normalize-uv-via-relate, r=BoxyUwU

Treat normalizing consts like normalizing types in deeply normalize

...so that we don't end up putting a top-level normalizes-to goal in the fulfillment context, which ICEs. This basically just models the normalize-const code off of the normalize-ty code above it, which uses an alias-relate goal instead.

Fixes #140571

r? lcnr
lnicola pushed a commit to lnicola/rust-analyzer that referenced this pull request Jun 9, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#140560 (Allow `#![doc(test(attr(..)))]` everywhere)
 - rust-lang/rust#141447 (Document representation of `Option<unsafe fn()>`)
 - rust-lang/rust#141661 (Make the `dangerous_implicit_autorefs` lint deny-by-default)
 - rust-lang/rust#142065 (Stabilize `const_eq_ignore_ascii_case`)
 - rust-lang/rust#142116 (Fix bootstrap tracing imports)
 - rust-lang/rust#142126 (Treat normalizing consts like normalizing types in deeply normalize)
 - rust-lang/rust#142140 (compiler: Sort and doc ExternAbi variants)
 - rust-lang/rust#142148 (compiler: Treat ForceWarning as a Warning for diagnostic level)
 - rust-lang/rust#142154 (get rid of spurious cfg(bootstrap))

r? `@ghost`
`@rustbot` modify labels: rollup
# for free to join this conversation on GitHub. Already have an account? # 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE: normalization_nested_goals.is_empty()
5 participants