Skip to content

fix: remove alias rigid before calling relate#158792

Open
cordx56 wants to merge 1 commit into
rust-lang:mainfrom
cordx56:fix/issue-158773
Open

fix: remove alias rigid before calling relate#158792
cordx56 wants to merge 1 commit into
rust-lang:mainfrom
cordx56:fix/issue-158773

Conversation

@cordx56

@cordx56 cordx56 commented Jul 5, 2026

Copy link
Copy Markdown

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 type SameTypeModuloInfer, which is outside of the trait resolver.
So the rigid should be removed.

I inserted ty::set_aliases_to_non_rigid before calling relate method and now it works correctly.

@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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jul 5, 2026
@rustbot

rustbot commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

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 (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue
Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 75 candidates
  • Random selection from 22 candidates

@cordx56

cordx56 commented Jul 5, 2026

Copy link
Copy Markdown
Author

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.
And if you find any problems, I would appreciate any comments.

@cordx56 cordx56 changed the title fix: remove alias regid before calling relate fix: remove alias rigid before calling relate Jul 5, 2026
@cordx56 cordx56 force-pushed the fix/issue-158773 branch from 0123fa1 to f06cf81 Compare July 5, 2026 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ICE]: No != Yes ( is_rigid_a != is_rigid_b)

3 participants