about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-08-10 09:07:57 +0900
committerGitHub <noreply@github.com>2020-08-10 09:07:57 +0900
commitf6c41fbed7cc2087512faec1877667e77b47ea3a (patch)
treea00e1f48c1926302b075dd02b1aa59b4aedd2882
parentd8ac403fd1c68660b6898777546cc191616cd48d (diff)
parent4e78760137c8d6c314c4ecafd7e8240a89737b6e (diff)
downloadrust-f6c41fbed7cc2087512faec1877667e77b47ea3a.tar.gz
rust-f6c41fbed7cc2087512faec1877667e77b47ea3a.zip
Rollup merge of #75328 - GuillaumeGomez:cleanup-e0749, r=Dylan-DPC
Cleanup E0749

r? @pickfire
-rw-r--r--src/librustc_error_codes/error_codes/E0749.md23
-rw-r--r--src/tools/tidy/src/error_codes_check.rs2
2 files changed, 20 insertions, 5 deletions
diff --git a/src/librustc_error_codes/error_codes/E0749.md b/src/librustc_error_codes/error_codes/E0749.md
index 9eb8ee4e3fd..7a1a745b53c 100644
--- a/src/librustc_error_codes/error_codes/E0749.md
+++ b/src/librustc_error_codes/error_codes/E0749.md
@@ -1,4 +1,19 @@
-Negative impls are not allowed to have any items. Negative impls
-declare that a trait is **not** implemented (and never will be) and
-hence there is no need to specify the values for trait methods or
-other items.
+An item was added on a negative impl.
+
+Erroneous code example:
+
+```compile_fail,E0749
+# #![feature(negative_impls)]
+trait MyTrait {
+    type Foo;
+}
+
+impl !MyTrait for u32 {
+    type Foo = i32; // error!
+}
+# fn main() {}
+```
+
+Negative impls are not allowed to have any items. Negative impls declare that a
+trait is **not** implemented (and never will be) and hence there is no need to
+specify the values for trait methods or other items.
diff --git a/src/tools/tidy/src/error_codes_check.rs b/src/tools/tidy/src/error_codes_check.rs
index 9c36d853ef7..2fa0f12d7e8 100644
--- a/src/tools/tidy/src/error_codes_check.rs
+++ b/src/tools/tidy/src/error_codes_check.rs
@@ -16,7 +16,7 @@ const EXEMPTED_FROM_TEST: &[&str] = &[
 ];
 
 // Some error codes don't have any tests apparently...
-const IGNORE_EXPLANATION_CHECK: &[&str] = &["E0570", "E0601", "E0602", "E0639", "E0729", "E0749"];
+const IGNORE_EXPLANATION_CHECK: &[&str] = &["E0570", "E0601", "E0602", "E0639", "E0729"];
 
 fn check_error_code_explanation(
     f: &str,