fix: remove alias rigid before calling relate - #158792
Conversation
|
Thanks for the pull request, and welcome! The Rust Project is excited to review your changes, and you should hear from @mati865 (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:
|
|
Hi, @adwinwhite. I found the issue is easily resolved and fixed in this PR. If you already working on this problem, sorry for taking it without your confirm. |
relaterelate
|
Hi, could you check whether the problem can be fixed at the root? Like if there's something that should be normalized but not. |
|
Thanks for reviewing! Okay I will check it. But I will do it after my working hours so it will be late… |
|
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. |
|
Hi, I pushed new code that does not use |
|
r? @adwinwhite |
|
Sorry for being so slow. Could you try |
This PR fixes #158773.
This fix resolves regression from at least nightly 1.96.0, as I checked.
Cause of issue
In the current code,
relate(a, b)is called on the typeSameTypeModuloInfer, which is outside of the trait resolver.So the rigid should be removed.
I inserted
ty::set_aliases_to_non_rigidbefore callingrelatemethod and now it works correctly.