Add support for auto traits
nikomatsakis opened this issue · comments
Niko Matsakis commented
We need to support auto traits:
- Extract trait declarations with an (optional)
auto
qualifier; perhaps in the form of a "flag list" that leaves room for other flags, likemarker
, to be added in the future. - Add negative impls (so that people can "opt out" from auto traits).
- Extend
decl-clauses-for-predicate
so that, if we are provinghas-impl
on an auto-trait for an ADT, we look to see if there is any impl at all (pos or neg) for that trait defined on that struct. If not, we add a default impl based on the contents of the struct.