Do not eagerly fold consts in normalize_param_env_or_error if new solver#141332
Merged
bors merged 1 commit intorust-lang:masterfrom May 21, 2025
Merged
Do not eagerly fold consts in normalize_param_env_or_error if new solver#141332bors merged 1 commit intorust-lang:masterfrom
normalize_param_env_or_error if new solver#141332bors merged 1 commit intorust-lang:masterfrom
Conversation
Contributor
|
@bors r+ rollup |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 21, 2025
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#141267 (only resolve top-level guard patterns' guards once) - rust-lang#141280 (Use Docker cache from the current repository) - rust-lang#141296 (Async drop fix for 'broken mir, place has deref as later projection') - rust-lang#141328 (When AsyncDrop impl is empty, sync drop generated in elaborator) - rust-lang#141332 (Do not eagerly fold consts in `normalize_param_env_or_error` if new solver) - rust-lang#141333 (Use `DeepRejectCtxt` in `assemble_inherent_candidates_from_param`) - rust-lang#141334 (eagerly check nested obligations when coercing fndefs) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 21, 2025
Rollup merge of rust-lang#141332 - compiler-errors:no-fold-const, r=lcnr Do not eagerly fold consts in `normalize_param_env_or_error` if new solver Fixes rust-lang/trait-system-refactor-initiative#213 Given: ``` trait Trait: Deref<Target = [u8; { 1 + 1 }]> {} ``` when elaborating param env for `Trait`, we have `Self: Trait`, `Self: Deref<Target = [u8; {anon const}]>`. Before this PR, we would fold the anon consts away *before* elaborating. However, we end up getting another *un-folded* copy of the anon const from elaborating `Self: Trait`. This leads to normalization ambiguity. r? lcnr
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes rust-lang/trait-system-refactor-initiative#213
Given:
when elaborating param env for
Trait, we haveSelf: Trait,Self: Deref<Target = [u8; {anon const}]>.Before this PR, we would fold the anon consts away before elaborating. However, we end up getting another un-folded copy of the anon const from elaborating
Self: Trait. This leads to normalization ambiguity.r? lcnr