about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-08-07 10:01:06 +0000
committerbors <bors@rust-lang.org>2017-08-07 10:01:06 +0000
commit95936375a0f04cd2553885c7dcba5e60f491b2bf (patch)
tree61620831a3549ad18700d9eaddd7b25f0ec2da56 /src/libsyntax
parent3de807a00baac8139dbdcea5f893d9346ba80adc (diff)
parent75b7a6f1a662dab0752d189ab635580a21b06e42 (diff)
downloadrust-95936375a0f04cd2553885c7dcba5e60f491b2bf.tar.gz
rust-95936375a0f04cd2553885c7dcba5e60f491b2bf.zip
Auto merge of #43709 - zackmdavis:de-orphan_extended_information, r=GuillaumeGomez
de-orphan extended information

Bizarrely, librustc_passes, librustc_plugin, librustc_mir, and libsyntax [weren't getting their error explanations registered](https://github.com/rust-lang/rust/issues/35284) (leaving _several_ error codes absent from [the index](https://doc.rust-lang.org/nightly/error-index.html) and `--explain`). This surfaced a few latent doctest failures that were fixed where readily possible and ignored (with a recorded excuse) if not.

Also, we don't issue E0563 anymore.

r? @GuillaumeGomez
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/diagnostic_list.rs32
-rw-r--r--src/libsyntax/lib.rs2
2 files changed, 23 insertions, 11 deletions
diff --git a/src/libsyntax/diagnostic_list.rs b/src/libsyntax/diagnostic_list.rs
index 508feca9731..6598ecb9444 100644
--- a/src/libsyntax/diagnostic_list.rs
+++ b/src/libsyntax/diagnostic_list.rs
@@ -42,7 +42,7 @@ The `inline` attribute was malformed.
 
 Erroneous code example:
 
-```compile_fail,E0534
+```ignore (compile_fail not working here; see Issue #43707)
 #[inline()] // error: expected one argument
 pub fn something() {}
 
@@ -80,7 +80,7 @@ An unknown argument was given to the `inline` attribute.
 
 Erroneous code example:
 
-```compile_fail,E0535
+```ignore (compile_fail not working here; see Issue #43707)
 #[inline(unknown)] // error: invalid argument
 pub fn something() {}
 
@@ -190,7 +190,9 @@ A literal was used in an attribute that doesn't support literals.
 
 Erroneous code example:
 
-```compile_fail,E0565
+```ignore (compile_fail not working here; see Issue #43707)
+#![feature(attr_literals)]
+
 #[inline("always")] // error: unsupported literal
 pub fn something() {}
 ```
@@ -209,7 +211,7 @@ A file wasn't found for an out-of-line module.
 
 Erroneous code example:
 
-```compile_fail,E0583
+```ignore (compile_fail not working here; see Issue #43707)
 mod file_that_doesnt_exist; // error: file not found for module
 
 fn main() {}
@@ -251,23 +253,33 @@ An inclusive range was used with no end.
 Erroneous code example:
 
 ```compile_fail,E0586
-let tmp = vec![0, 1, 2, 3, 4, 4, 3, 3, 2, 1];
-let x = &tmp[1...]; // error: inclusive range was used with no end
+#![feature(inclusive_range_syntax)]
+
+fn main() {
+    let tmp = vec![0, 1, 2, 3, 4, 4, 3, 3, 2, 1];
+    let x = &tmp[1...]; // error: inclusive range was used with no end
+}
 ```
 
 An inclusive range needs an end in order to *include* it. If you just need a
 start and no end, use a non-inclusive range (with `..`):
 
 ```
-let tmp = vec![0, 1, 2, 3, 4, 4, 3, 3, 2, 1];
-let x = &tmp[1..]; // ok!
+fn main() {
+    let tmp = vec![0, 1, 2, 3, 4, 4, 3, 3, 2, 1];
+    let x = &tmp[1..]; // ok!
+}
 ```
 
 Or put an end to your inclusive range:
 
 ```
-let tmp = vec![0, 1, 2, 3, 4, 4, 3, 3, 2, 1];
-let x = &tmp[1...3]; // ok!
+#![feature(inclusive_range_syntax)]
+
+fn main() {
+    let tmp = vec![0, 1, 2, 3, 4, 4, 3, 3, 2, 1];
+    let x = &tmp[1...3]; // ok!
+}
 ```
 "##,
 
diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs
index a8338fccb6b..43345b02bf6 100644
--- a/src/libsyntax/lib.rs
+++ b/src/libsyntax/lib.rs
@@ -148,4 +148,4 @@ pub mod ext {
 #[cfg(test)]
 mod test_snippet;
 
-// __build_diagnostic_array! { libsyntax, DIAGNOSTICS }
+__build_diagnostic_array! { libsyntax, DIAGNOSTICS }