fix: defer const normalize in coherence mode#158205
Conversation
|
changes to the core type system cc @lcnr |
|
Thanks for the pull request, and welcome! The Rust Project is excited to review your changes, and you should hear from @petrochenkov (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 (
Why was this reviewer chosen?The reviewer was selected based on:
|
|
r? lcnr |
This comment has been minimized.
This comment has been minimized.
2054520 to
134d2ce
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@rustbot review |
| // ripped out soon so this shouldn't matter soon. | ||
| StructurallyRelateAliases::No if !tcx.features().generic_const_exprs() => { | ||
| StructurallyRelateAliases::No | ||
| if !tcx.features().generic_const_exprs() || defer_in_coherence => |
There was a problem hiding this comment.
hmm, can you change this to instead be self.infcx.next_trait_solver() || !tcx.features().generic_const_exprs()
We don't support gce with the new solver but currently have the new solver in coherence if gce is enabled, so this should have the same results as your PR while being easier (for me) to reason about
There was a problem hiding this comment.
I see, and thank you for reviewing!
I'm running tests and will push a revised version!
I'm not confident that this fix is the best and desired in the long term point of view, but I'm confident that this does not do anything unsound.
Fixes #157937, by deferring normalization of associated const, except for anon, in coherence mode.
This fix prevents reporting impls, including associated const, are not overlapping.