Skip to content

Conversation

ChayimFriedman2
Copy link
Contributor

Chalk represents dyn types as a list of predicate, the self type should be there. The next solver represents them quite differently. The Self was forgotten for the auto trait case.

Should mitigate #20443 (comment) and #20443 (comment). The panic is when we try to display the type (it happens to be in MIR lowering) and Chalk expects the TraitRef to have a self type. The actual error is way earlier, in inference, when we normalize the type. I chose to write the test at the panic site because it's easy to reproduce the issue there.

…0) to auto traits' substitutions

Chalk represents dyn types as a list of predicate, the self type should be there. The next solver represents them quite differently. The `Self` was forgotten for the auto trait case.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 28, 2025
@ShoyuVanilla ShoyuVanilla added this pull request to the merge queue Aug 30, 2025
Merged via the queue into rust-lang:master with commit a271dac Aug 30, 2025
15 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 30, 2025
@ChayimFriedman2 ChayimFriedman2 deleted the ns-projection-dyn-auto-trait branch August 30, 2025 18:38
@lnicola
Copy link
Member

lnicola commented Aug 31, 2025

changelog fixup #20329

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants