Clean up E0749 explanation
This commit is contained in:
parent
8e738539be
commit
cc54a1f930
@ -1,4 +1,19 @@
|
|||||||
Negative impls are not allowed to have any items. Negative impls
|
An item was added on a negative impl.
|
||||||
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
|
Erroneous code example:
|
||||||
other items.
|
|
||||||
|
```compile_fail,E0749
|
||||||
|
# #![feature(negative_impls)]
|
||||||
|
trait MyTrait {
|
||||||
|
type Foo;
|
||||||
|
}
|
||||||
|
|
||||||
|
impl !MyTrait for u32 {
|
||||||
|
type Foo = i32; // error!
|
||||||
|
}
|
||||||
|
# fn main() {}
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user