blob: 8794f7868f30296ab022c341db3ed635dcd22e29 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
There are both a positive and negative trait implementation for the same type.
Erroneous code example:
```compile_fail,E0751
trait MyTrait {}
impl MyTrait for i32 { }
impl !MyTrait for i32 { } // error!
```
Negative implementations are a promise that the trait will never be implemented
for the given types. Therefore, both cannot exists at the same time.
|