Closed
Description
The current logic that integrates projection predicates into trait selection is somewhat flawed. I made some simplifying choices:
- For one thing, it only works if the self type is a projection type, but in reality it should be able to handle any input type. Moreover, there may be multiple projection types in play.
- Also, the integration with inference is not particularly smart.
- Finally, if there are where clauses that overlap with projections, we currently just choose the where clause every time, but this may influence inference or have other subtle effects.
These all feel a bit like corner cases for now and I think we can get away with leaving things as they are and later coming in with a much smarter trait selection system. It's clear that we're pushing the bounds of the current setup. Trait reform 2.0 anybody?