Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix order of normalization and recursion in const folding. #129208

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

veluca93
Copy link
Contributor

Fixes #126831.

Without this patch, type normalization is not always idempotent, which leads to all sorts of bugs in places that assume that normalizing a normalized type does nothing.

Tracking issue: #95174

r? BoxyUwU

@rustbot
Copy link
Collaborator

rustbot commented Aug 17, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @BoxyUwU (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@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 Aug 17, 2024
@BoxyUwU
Copy link
Member

BoxyUwU commented Aug 17, 2024

Can you add a test of the example from the issue. You should be able to specify the -C flag via an annotation at the top of the test like: //@ compile-flags: -Cdebuginfo=2

Fixes rust-lang#126831.

Without this patch, type normalization is not always idempotent, which
leads to all sorts of bugs in places that assume that normalizing a
normalized type does nothing.
@BoxyUwU
Copy link
Member

BoxyUwU commented Aug 18, 2024

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 18, 2024

📌 Commit 7fd6232 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 Aug 18, 2024
jieyouxu added a commit to jieyouxu/rust that referenced this pull request Aug 18, 2024
Fix order of normalization and recursion in const folding.

Fixes rust-lang#126831.

Without this patch, type normalization is not always idempotent, which leads to all sorts of bugs in places that assume that normalizing a normalized type does nothing.

Tracking issue: rust-lang#95174

r? BoxyUwU
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 18, 2024
Rollup of 4 pull requests

Successful merges:

 - rust-lang#128084 (Suggest adding Result return type for associated method in E0277.)
 - rust-lang#129187 (bootstrap: fix clean's remove_dir_all implementation)
 - rust-lang#129208 (Fix order of normalization and recursion in const folding.)
 - rust-lang#129228 (crashes: more tests)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 19, 2024
Rollup of 7 pull requests

Successful merges:

 - rust-lang#127679 (Stabilize `raw_ref_op` (RFC 2582))
 - rust-lang#128084 (Suggest adding Result return type for associated method in E0277.)
 - rust-lang#128628 (When deduplicating unreachable blocks, erase the source information.)
 - rust-lang#128902 (doc: std::env::var: Returns None for names with '=' or NUL byte)
 - rust-lang#129048 (Update `crosstool-ng` for loongarch64)
 - rust-lang#129116 (Include a copy of `compiler-rt` source in the `download-ci-llvm` tarball)
 - rust-lang#129208 (Fix order of normalization and recursion in const folding.)

r? `@ghost`
`@rustbot` modify labels: rollup
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 19, 2024
Rollup merge of rust-lang#129208 - veluca93:adt_const_fix, r=BoxyUwU

Fix order of normalization and recursion in const folding.

Fixes rust-lang#126831.

Without this patch, type normalization is not always idempotent, which leads to all sorts of bugs in places that assume that normalizing a normalized type does nothing.

Tracking issue: rust-lang#95174

r? BoxyUwU
@bors bors merged commit 8a513f1 into rust-lang:master Aug 19, 2024
6 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 19, 2024
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: type map: left == right
4 participants