Skip to content

Fix effect predicates from item bounds in old solver #134638

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 1 commit into from
Dec 24, 2024

Conversation

compiler-errors
Copy link
Member

r? lcnr

@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 Dec 22, 2024
@rust-log-analyzer

This comment has been minimized.

Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

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

nit, then r=me

<T as Trait>::Assoc::<U>::func();
//~^ ERROR the trait bound `<T as Trait>::Assoc<U>: ~const Trait` is not satisfied
//[current]~^ ERROR the trait bound `U: ~const Other` is not satisfied
//[next]~^^ ERROR the trait bound `<T as Trait>::Assoc<U>: ~const Trait` is not satisfied
Copy link
Contributor

Choose a reason for hiding this comment

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

deeply_normalize_for_diagnostics?

Copy link
Member Author

@compiler-errors compiler-errors Dec 23, 2024

Choose a reason for hiding this comment

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

<T as Trait>::Assoc<U> is not U. There's no normalization happening here -- that's a rigid alias. This is due to the fact that the proof tree looks like:

  • <T as Trait>::Assoc<U>: ~const Other proven via an item bound requires:
    • U: ~const Other

but we don't go deeper in the proof tree visitor b/c the nested obligation is not considered a where clause for the purposes of proof tree visitor. This may be fixed by #132345.

@compiler-errors
Copy link
Member Author

Nothing to change here

@bors r=lcnr rollup

@bors
Copy link
Collaborator

bors commented Dec 23, 2024

📌 Commit 535bc78 has been approved by lcnr

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 Dec 23, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 24, 2024
Rollup of 5 pull requests

Successful merges:

 - rust-lang#134638 (Fix effect predicates from item bounds in old solver)
 - rust-lang#134662 (Fix safety docs for `dyn Any + Send {+ Sync}`)
 - rust-lang#134689 (core: fix const ptr::swap_nonoverlapping when there are pointers at odd offsets)
 - rust-lang#134699 (Belay new reviews for workingjubilee)
 - rust-lang#134701 (Correctly note item kind in `NonConstFunctionCall` error message)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c2f44cd into rust-lang:master Dec 24, 2024
6 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 24, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 24, 2024
Rollup merge of rust-lang#134638 - compiler-errors:fx-item-bounds, r=lcnr

Fix effect predicates from item bounds in old solver

r? lcnr
# 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants