From 11f74189f1fa92fce4d7bfec5d9eed4e1f0c352e Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 13 Jan 2020 13:32:32 +0100 Subject: [PATCH 1/2] Clean up E0191 explanation --- src/librustc_error_codes/error_codes/E0191.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/librustc_error_codes/error_codes/E0191.md b/src/librustc_error_codes/error_codes/E0191.md index b79196f6cec7a..46b773bdc50d6 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 { From 3ec0a84e6ef35f58c837a0afbcf02b70ee543459 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 13 Jan 2020 13:34:55 +0100 Subject: [PATCH 2/2] Clean up E0192 explanation --- src/librustc_error_codes/error_codes/E0192.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/librustc_error_codes/error_codes/E0192.md b/src/librustc_error_codes/error_codes/E0192.md index 33308868cb235..5fd951b2e86cb 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].