]> git.proxmox.com Git - rustc.git/blame - compiler/rustc_error_codes/src/error_codes/E0192.md
New upstream version 1.60.0+dfsg1
[rustc.git] / compiler / rustc_error_codes / src / error_codes / E0192.md
CommitLineData
5099ac24
FG
1#### Note: this error code is no longer emitted by the compiler.
2
dfeec247
XL
3A negative impl was added on a trait implementation.
4
5Erroneous code example:
6
5099ac24 7```compile_fail
dfeec247
XL
8trait Trait {
9 type Bar;
10}
11
12struct Foo;
13
5099ac24 14impl !Trait for Foo { } //~ ERROR
dfeec247
XL
15
16fn main() {}
17```
18
60c5eb7d
XL
19Negative impls are only allowed for auto traits. For more
20information 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