about summary refs log tree commit diff
path: root/compiler/rustc_error_codes/src/error_codes/E0751.md
blob: 825809b229aa48008bf57b72dbd1ed6ca9106e47 (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 exist at the same time.