permit negative impls for non-auto traits

This commit is contained in:
Niko Matsakis 2020-01-08 06:39:38 -05:00
parent a17dd36084
commit e8a05e201e
35 changed files with 328 additions and 101 deletions

View file

@ -0,0 +1,4 @@
Negative impls are not allowed to have any items. Negative impls
declare that a trait is **not** implemented (and never will be) and
hence there is no need to specify the values for trait methods or
other items.

View file

@ -0,0 +1,4 @@
Negative impls cannot be default impls. A default impl supplies
default values for the items within to be used by other impls, whereas
a negative impl declares that there are no other impls. These don't
make sense to combine.