]>
Commit | Line | Data |
---|---|---|
5099ac24 FG |
1 | #### Note: this error code is no longer emitted by the compiler. |
2 | ||
dfeec247 XL |
3 | A negative impl was added on a trait implementation. |
4 | ||
5 | Erroneous code example: | |
6 | ||
5099ac24 | 7 | ```compile_fail |
dfeec247 XL |
8 | trait Trait { |
9 | type Bar; | |
10 | } | |
11 | ||
12 | struct Foo; | |
13 | ||
5099ac24 | 14 | impl !Trait for Foo { } //~ ERROR |
dfeec247 XL |
15 | |
16 | fn main() {} | |
17 | ``` | |
18 | ||
60c5eb7d XL |
19 | Negative impls are only allowed for auto traits. For more |
20 | information see the [opt-in builtin traits RFC][RFC 19]. | |
21 | ||
22 | [RFC 19]: https://github.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md |