diff options
Diffstat (limited to 'compiler/rustc_error_codes/src/error_codes/E0192.md')
-rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0192.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0192.md b/compiler/rustc_error_codes/src/error_codes/E0192.md new file mode 100644 index 000000000..deca042a9 --- /dev/null +++ b/compiler/rustc_error_codes/src/error_codes/E0192.md @@ -0,0 +1,22 @@ +#### Note: this error code is no longer emitted by the compiler. + +A negative impl was added on a trait implementation. + +Erroneous code example: + +```compile_fail +trait Trait { + type Bar; +} + +struct Foo; + +impl !Trait for Foo { } //~ ERROR + +fn main() {} +``` + +Negative impls are only allowed for auto traits. For more +information see the [opt-in builtin traits RFC][RFC 19]. + +[RFC 19]: https://github.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md |