]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0192.md
Rollup merge of #93556 - dtolnay:trailingcomma, r=cjgillot
[rust.git] / compiler / rustc_error_codes / src / error_codes / E0192.md
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
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