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

Normalize when equating dyn tails in MIR borrowck #128694

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

compiler-errors
Copy link
Member

See the explanation in the comment.

Fixes #128621
cc @WaffleLapkin

@rustbot
Copy link
Collaborator

rustbot commented Aug 5, 2024

r? @chenyukang

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

@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 5, 2024
@lqd
Copy link
Member

lqd commented Aug 5, 2024

As #120248 is already on beta, this fix will be needed there.

@rustbot label +beta-nominated

@rustbot rustbot added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Aug 5, 2024
@matthiaskrgr
Copy link
Member

Hmm there should be one or two crash tests for 128621 that pass now 🤔

Copy link
Member

@WaffleLapkin WaffleLapkin left a comment

Choose a reason for hiding this comment

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

r? WaffleLapkin

Comment on lines +2334 to +2336
// N.B. `struct_tail_with_normalize` only "structurally resolves"
// the type. It is not fully normalized, so we have to normalize it
// afterwards.
Copy link
Member

Choose a reason for hiding this comment

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

Ah, tricky. Should probably mention this in struct_tail_with_normalize docs.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I'm thinking of better names for this function to make it obvious it's not totally normalizing...

@rustbot rustbot assigned WaffleLapkin and unassigned chenyukang Aug 5, 2024
@WaffleLapkin
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Aug 5, 2024

📌 Commit c6f8672 has been approved by WaffleLapkin

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 5, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 5, 2024
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#122049 (Promote riscv64gc-unknown-linux-musl to tier 2)
 - rust-lang#128580 (Use `ParamEnv::reveal_all` in CFI)
 - rust-lang#128688 (custom MIR: add support for tail calls)
 - rust-lang#128694 (Normalize when equating `dyn` tails in MIR borrowck)
 - rust-lang#128697 (interpret: move nullary-op evaluation into operator.rs)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 77f57cb into rust-lang:master Aug 6, 2024
6 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 6, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 6, 2024
Rollup merge of rust-lang#128694 - compiler-errors:norm, r=WaffleLapkin

Normalize when equating `dyn` tails in MIR borrowck

See the explanation in the comment.

Fixes rust-lang#128621
cc `@WaffleLapkin`
@apiraino
Copy link
Contributor

apiraino commented Aug 8, 2024

Beta backport accepted as per compiler team on Zulip. A backport PR will be authored by the release team at the end of the current development cycle.

@rustbot label +beta-accepted

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Aug 8, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 12, 2024
…, r=lcnr

Normalize struct tail properly for `dyn` ptr-to-ptr casting in new solver

Realized that the new solver didn't handle ptr-to-ptr casting correctly.

r? lcnr

Built on rust-lang#128694
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 12, 2024
…, r=lcnr

Normalize struct tail properly for `dyn` ptr-to-ptr casting in new solver

Realized that the new solver didn't handle ptr-to-ptr casting correctly.

r? lcnr

Built on rust-lang#128694
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 12, 2024
…, r=lcnr

Normalize struct tail properly for `dyn` ptr-to-ptr casting in new solver

Realized that the new solver didn't handle ptr-to-ptr casting correctly.

r? lcnr

Built on rust-lang#128694
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 12, 2024
…, r=lcnr

Normalize struct tail properly for `dyn` ptr-to-ptr casting in new solver

Realized that the new solver didn't handle ptr-to-ptr casting correctly.

r? lcnr

Built on rust-lang#128694
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 13, 2024
Rollup merge of rust-lang#128712 - compiler-errors:normalize-borrowck, r=lcnr

Normalize struct tail properly for `dyn` ptr-to-ptr casting in new solver

Realized that the new solver didn't handle ptr-to-ptr casting correctly.

r? lcnr

Built on rust-lang#128694
@cuviper cuviper modified the milestones: 1.82.0, 1.81.0 Aug 13, 2024
@cuviper cuviper removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Aug 13, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 15, 2024
[beta] backports and bump stage0

- Disable jump threading of float equality rust-lang#128271
- Normalize when equating `dyn` tails in MIR borrowck rust-lang#128694
- Improve `Ord` violation help rust-lang#128273
- bump stage0 to stable 1.80.1
- Revert rust-lang#125915 on beta rust-lang#128760
- derive(SmartPointer): register helper attributes rust-lang#128925
- Fix bug in `Parser::look_ahead`. rust-lang#128994

r? cuviper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. 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: called Result::unwrap() on an Err value: NoSolution
9 participants