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