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
Do not try to reveal hidden types when trying to prove Freeze in the defining scope #122192
base: master
Are you sure you want to change the base?
Conversation
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor |
Reassigning reviewer because it allows more code on stable and needs trait system reviews |
happy with this change in general, unless this blocks the stabilization of ATPIT I would wait until #122077 is merged for an in-depth review |
This PR is low priority and deserves some mir_const_qualifs cleanups and reduplications before landing anyway. The other two PRs this one is based on are needed for ATPIT |
69500f9
to
8de5565
Compare
I would like to make more code compile by avoiding unnecessary (and false) query cycles in const fn f() -> impl Eq {
g()
}
const fn g() {} The reason is that when checking whether the return type implements @rfcbot merge |
Team member @oli-obk has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
As a quick note: this differs from the new solver in that the new solver instead normalizes the opaque type by looking at the opaque type storage, so the new solver may instead return ambiguity or success instead of Theoretically the incompleteness of the old solver may guide type inference, but as there are no trait implementations with @rfcbot reviewed |
fixes #99793
this avoids the cycle error by just causing a selection error, which is not fatal. We pessimistically assume that freeze does not hold, which is always a safe assumption.