about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-01-14 14:02:28 +0900
committerGitHub <noreply@github.com>2020-01-14 14:02:28 +0900
commitd6d5b74fb229685a932a8a470635d3ea2517117c (patch)
tree70e7eb8f6f373ced889445a7fcc8e175fd7d2015
parent076d6a0c9a6dd53358dbd56ca1aa662325c2df6b (diff)
parent3ec0a84e6ef35f58c837a0afbcf02b70ee543459 (diff)
downloadrust-d6d5b74fb229685a932a8a470635d3ea2517117c.tar.gz
rust-d6d5b74fb229685a932a8a470635d3ea2517117c.zip
Rollup merge of #68176 - GuillaumeGomez:clean-up-err-codes, r=Dylan-DPC
Clean up err codes

r? @Dylan-DPC
-rw-r--r--src/librustc_error_codes/error_codes/E0191.md10
-rw-r--r--src/librustc_error_codes/error_codes/E0192.md16
2 files changed, 22 insertions, 4 deletions
diff --git a/src/librustc_error_codes/error_codes/E0191.md b/src/librustc_error_codes/error_codes/E0191.md
index b79196f6cec..46b773bdc50 100644
--- a/src/librustc_error_codes/error_codes/E0191.md
+++ b/src/librustc_error_codes/error_codes/E0191.md
@@ -1,5 +1,6 @@
-Trait objects need to have all associated types specified. Erroneous code
-example:
+An associated type wasn't specified for a trait object.
+
+Erroneous code example:
 
 ```compile_fail,E0191
 trait Trait {
@@ -10,8 +11,9 @@ type Foo = Trait; // error: the value of the associated type `Bar` (from
                   //        the trait `Trait`) must be specified
 ```
 
-Please verify you specified all associated types of the trait and that you
-used the right trait. Example:
+Trait objects need to have all associated types specified. Please verify that
+all associated types of the trait were specified and the correct trait was used.
+Example:
 
 ```
 trait Trait {
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].