diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-01-13 13:34:55 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-01-13 15:02:49 +0100 |
| commit | 3ec0a84e6ef35f58c837a0afbcf02b70ee543459 (patch) | |
| tree | 5b73c53195fbbcb752b0387ae0754b077df4376f | |
| parent | 11f74189f1fa92fce4d7bfec5d9eed4e1f0c352e (diff) | |
| download | rust-3ec0a84e6ef35f58c837a0afbcf02b70ee543459.tar.gz rust-3ec0a84e6ef35f58c837a0afbcf02b70ee543459.zip | |
Clean up E0192 explanation
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0192.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/librustc_error_codes/error_codes/E0192.md b/src/librustc_error_codes/error_codes/E0192.md index 33308868cb2..5fd951b2e86 100644 --- a/src/librustc_error_codes/error_codes/E0192.md +++ b/src/librustc_error_codes/error_codes/E0192.md @@ -1,3 +1,19 @@ +A negative impl was added on a trait implementation. + +Erroneous code example: + +```compile_fail,E0192 +trait Trait { + type Bar; +} + +struct Foo; + +impl !Trait for Foo { } //~ ERROR E0192 + +fn main() {} +``` + Negative impls are only allowed for auto traits. For more information see the [opt-in builtin traits RFC][RFC 19]. |
