about summary refs log tree commit diff
path: root/src/librustc_error_codes/error_codes
diff options
context:
space:
mode:
authorIvan Tham <pickfire@riseup.net>2020-08-10 22:33:17 +0800
committerGitHub <noreply@github.com>2020-08-10 22:33:17 +0800
commita2d7c33aa83d39cd0ab1fba0a8ccdfd2c7f29576 (patch)
treea85f72945d8e76c4152183558e399125501a51c7 /src/librustc_error_codes/error_codes
parentec23f4ed3fdb7f09a4398a32eaf486da22bd3ae9 (diff)
downloadrust-a2d7c33aa83d39cd0ab1fba0a8ccdfd2c7f29576.tar.gz
rust-a2d7c33aa83d39cd0ab1fba0a8ccdfd2c7f29576.zip
Split fix into another section for E0749
Diffstat (limited to 'src/librustc_error_codes/error_codes')
-rw-r--r--src/librustc_error_codes/error_codes/E0749.md12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/librustc_error_codes/error_codes/E0749.md b/src/librustc_error_codes/error_codes/E0749.md
index 74cd2903f6d..962da0eda08 100644
--- a/src/librustc_error_codes/error_codes/E0749.md
+++ b/src/librustc_error_codes/error_codes/E0749.md
@@ -11,10 +11,20 @@ trait MyTrait {
 impl !MyTrait for u32 {
     type Foo = i32; // error!
 }
-// impl !MyTrait for u32 {} // fix
 # 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.
+
+One way to fix this is to remove the items in negative impls.
+
+```
+# #![feature(negative_impls)]
+trait MyTrait {
+    type Foo;
+}
+
+impl !MyTrait for u32 {}
+```