Skip to content

Conversation

@bvanjoi
Copy link
Contributor

@bvanjoi bvanjoi commented Jul 10, 2025

I've now modified the implementation to use the disambiguated index from the last impl trait in previous methods as the starting index for the current method's impl trait.

Fixes #143697

r? @compiler-errors

@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. labels Jul 10, 2025
@compiler-errors
Copy link
Member

I wonder if we should just ditch this strategy and collect all RPITITs at once per trait. This complexity seems unnecessary.

i.e. change associated_types_for_impl_traits_in_associated_fn which takes the DefId of a trait method to associated_types_for_impl_traits_in_trait which takes the DefId of a trait itself.

We'd just need to adjust some callsites and play around with the usage a bit, but I think it's doable...

Would you be willing to experiment with this strategy instead?

@compiler-errors
Copy link
Member

I agree with the approach in the other PR, so I'm gonna close this. Thanks for testing it out!

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ICE / hang found DefPathHash collision between DefPath

3 participants