rust-lang / a-mir-formality

a model of MIR and the Rust type/trait system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for auto traits

nikomatsakis opened this issue · comments

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, like marker, 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 proving has-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.