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

Relax a debug assertion for dyn principal *equality* in codegen #130863

Merged
merged 2 commits into from
Oct 2, 2024

Conversation

compiler-errors
Copy link
Member

Maybe this sucks and I should just bite the bullet and use infcx.sub here. Thoughts?

r? lcnr

Fixes #130855

@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 Sep 26, 2024
@rustbot
Copy link
Collaborator

rustbot commented Sep 26, 2024

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@lcnr
Copy link
Contributor

lcnr commented Sep 26, 2024

I would like to go with (something like) relate_types here 🤔 because rn this debug assertions wouldn't trigger if we're contravariant by accident. would also be fine with merging this as is 🤷

@compiler-errors
Copy link
Member Author

Nah, I can add a relate_types-esque fn; I'll just import rustc_trait_selection into codegen_ssa, it shouldn't hurt.

@rustbot author

@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 Sep 27, 2024
@rustbot
Copy link
Collaborator

rustbot commented Sep 28, 2024

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@compiler-errors
Copy link
Member Author

@rustbot ready

@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 Sep 28, 2024
@rustbot
Copy link
Collaborator

rustbot commented Sep 30, 2024

Some changes occurred in engine.rs, potentially modifying the public API of ObligationCtxt.

cc @lcnr, @compiler-errors

@compiler-errors
Copy link
Member Author

This PR is ready. I'd rather not continue going back and forth here. If you're not happy with the state of this PR, then I'd rather just revert the addition of these debug assertions completely, bc working on this PR and the others has turned into somewhat of a headache :(

&ObligationCause::dummy(),
hr_target_principal,
hr_source_principal,
),
Copy link
Contributor

Choose a reason for hiding this comment

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

r=me regardless, but

is adding ocx.eq_trace necessary or can we simply use ocx.eq here given that we don't care about diagnostics at all

Copy link
Member Author

Choose a reason for hiding this comment

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

ExistentialTraitRef does not implement ToTrace. Wanted to avoid that since it's almost always wrong compared to using the binders for the trace, and the new trait solver has relate_no_trace which avoids that.

@compiler-errors
Copy link
Member Author

@bors r=lcnr rollup

@bors
Copy link
Contributor

bors commented Oct 2, 2024

📌 Commit cbb5047 has been approved by lcnr

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 2, 2024
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 2, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 2, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#130863 (Relax a debug assertion for dyn principal *equality* in codegen)
 - rust-lang#131016 (Apple: Do not specify an SDK version in `rlib` object files)
 - rust-lang#131140 (Handle `rustc_hir_analysis` cases of `potential_query_instability` lint)
 - rust-lang#131141 (mpmc doctest: make sure main thread waits for child threads)
 - rust-lang#131150 (only query `params_in_repr` if def kind is adt)
 - rust-lang#131151 (Replace zero-width whitespace with a visible `\` in the PR template)
 - rust-lang#131152 (Improve const traits diagnostics for new desugaring)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f9ba552 into rust-lang:master Oct 2, 2024
6 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Oct 2, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 2, 2024
Rollup merge of rust-lang#130863 - compiler-errors:relax-codegen-dyn-assert, r=lcnr

Relax a debug assertion for dyn principal *equality* in codegen

Maybe this sucks and I should just bite the bullet and use `infcx.sub` here. Thoughts?

r? lcnr

Fixes rust-lang#130855
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: NOP unsize vtable changed principal trait ref
5 participants