about summary refs log tree commit diff
path: root/src/librustc_error_codes/error_codes
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-01-18 18:37:02 +0000
committerbors <bors@rust-lang.org>2020-01-18 18:37:02 +0000
commit1ce08f9d631ef767c915270bc63283c6af40dc3f (patch)
tree77979000124d01c535bb69cf21e752995b4e0f7e /src/librustc_error_codes/error_codes
parent779f85bac6b304dd4cad5981acf053a2c0601582 (diff)
parente8819b62b4c45d380058c5f86c7e9484ae05ddb5 (diff)
downloadrust-1ce08f9d631ef767c915270bc63283c6af40dc3f.tar.gz
rust-1ce08f9d631ef767c915270bc63283c6af40dc3f.zip
Auto merge of #68351 - Centril:rollup-0gzuh0p, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #67712 (Stabilize `#![feature(slice_patterns)]` in 1.42.0)
 - #68224 (Prevent urls in headings)
 - #68340 (clean up e0200 explanation)
 - #68341 (Fix syscalls tables in docs of std::time.)
 - #68342 (improve type_name_of_val docs)

Failed merges:

r? @ghost
Diffstat (limited to 'src/librustc_error_codes/error_codes')
-rw-r--r--src/librustc_error_codes/error_codes/E0200.md19
-rw-r--r--src/librustc_error_codes/error_codes/E0527.md2
-rw-r--r--src/librustc_error_codes/error_codes/E0528.md4
-rw-r--r--src/librustc_error_codes/error_codes/E0730.md2
4 files changed, 14 insertions, 13 deletions
diff --git a/src/librustc_error_codes/error_codes/E0200.md b/src/librustc_error_codes/error_codes/E0200.md
index 865e91430ac..7245bb59ce5 100644
--- a/src/librustc_error_codes/error_codes/E0200.md
+++ b/src/librustc_error_codes/error_codes/E0200.md
@@ -1,14 +1,23 @@
+An unsafe trait was implemented without an unsafe implementation.
+
+Erroneous code example:
+
+```compile_fail,E0200
+struct Foo;
+
+unsafe trait Bar { }
+
+impl Bar for Foo { } // error!
+```
+
 Unsafe traits must have unsafe implementations. This error occurs when an
 implementation for an unsafe trait isn't marked as unsafe. This may be resolved
 by marking the unsafe implementation as unsafe.
 
-```compile_fail,E0200
+```
 struct Foo;
 
 unsafe trait Bar { }
 
-// this won't compile because Bar is unsafe and impl isn't unsafe
-impl Bar for Foo { }
-// this will compile
-unsafe impl Bar for Foo { }
+unsafe impl Bar for Foo { } // ok!
 ```
diff --git a/src/librustc_error_codes/error_codes/E0527.md b/src/librustc_error_codes/error_codes/E0527.md
index 4bff39dc770..97ea3126938 100644
--- a/src/librustc_error_codes/error_codes/E0527.md
+++ b/src/librustc_error_codes/error_codes/E0527.md
@@ -17,8 +17,6 @@ Ensure that the pattern is consistent with the size of the matched
 array. Additional elements can be matched with `..`:
 
 ```
-#![feature(slice_patterns)]
-
 let r = &[1, 2, 3, 4];
 match r {
     &[a, b, ..] => { // ok!
diff --git a/src/librustc_error_codes/error_codes/E0528.md b/src/librustc_error_codes/error_codes/E0528.md
index 4b6ea246991..54c2c4d4e9d 100644
--- a/src/librustc_error_codes/error_codes/E0528.md
+++ b/src/librustc_error_codes/error_codes/E0528.md
@@ -4,8 +4,6 @@ matched array.
 Example of erroneous code:
 
 ```compile_fail,E0528
-#![feature(slice_patterns)]
-
 let r = &[1, 2];
 match r {
     &[a, b, c, rest @ ..] => { // error: pattern requires at least 3
@@ -19,8 +17,6 @@ Ensure that the matched array has at least as many elements as the pattern
 requires. You can match an arbitrary number of remaining elements with `..`:
 
 ```
-#![feature(slice_patterns)]
-
 let r = &[1, 2, 3, 4, 5];
 match r {
     &[a, b, c, rest @ ..] => { // ok!
diff --git a/src/librustc_error_codes/error_codes/E0730.md b/src/librustc_error_codes/error_codes/E0730.md
index 803a2514865..bf1f72be325 100644
--- a/src/librustc_error_codes/error_codes/E0730.md
+++ b/src/librustc_error_codes/error_codes/E0730.md
@@ -18,8 +18,6 @@ Ensure that the pattern is consistent with the size of the matched
 array. Additional elements can be matched with `..`:
 
 ```
-#![feature(slice_patterns)]
-
 let r = &[1, 2, 3, 4];
 match r {
     &[a, b, ..] => { // ok!