about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2020-01-17 17:28:17 -0800
committerGitHub <noreply@github.com>2020-01-17 17:28:17 -0800
commit2a1ab29806200b392a85cc5efe4a875641e80892 (patch)
tree8bb3c65339ab261f36b597bfae0de937359fdf08
parent7f6fdef0e92a8865728f130fdbeb6d0a1dbe7307 (diff)
parent9c6c2f16f00ed6f24866d2d4927b49d79b453a23 (diff)
downloadrust-2a1ab29806200b392a85cc5efe4a875641e80892.tar.gz
rust-2a1ab29806200b392a85cc5efe4a875641e80892.zip
Rollup merge of #68279 - GuillaumeGomez:clean-up-e0198, r=Dylan-DPC
Clean up E0198 explanation

r? @Dylan-DPC
-rw-r--r--src/librustc_error_codes/error_codes/E0198.md17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/librustc_error_codes/error_codes/E0198.md b/src/librustc_error_codes/error_codes/E0198.md
index 6504d60dbd1..687214a2050 100644
--- a/src/librustc_error_codes/error_codes/E0198.md
+++ b/src/librustc_error_codes/error_codes/E0198.md
@@ -1,17 +1,18 @@
-A negative implementation is one that excludes a type from implementing a
-particular trait. Not being able to use a trait is always a safe operation,
-so negative implementations are always safe and never need to be marked as
-unsafe.
+A negative implementation was marked as unsafe.
 
-```compile_fail
-#![feature(optin_builtin_traits)]
+Erroneous code example:
 
+```compile_fail
 struct Foo;
 
-// unsafe is unnecessary
-unsafe impl !Clone for Foo { }
+unsafe impl !Clone for Foo { } // error!
 ```
 
+A negative implementation is one that excludes a type from implementing a
+particular trait. Not being able to use a trait is always a safe operation,
+so negative implementations are always safe and never need to be marked as
+unsafe.
+
 This will compile:
 
 ```ignore (ignore auto_trait future compatibility warning)