about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorggomez <guillaume1.gomez@gmail.com>2016-08-29 16:27:04 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2016-09-04 01:32:30 +0200
commit7c53eb97df4dc39c88e452d67b4f51d5bca336f6 (patch)
tree4a983dc55041282f26330eee566fe65661cca1f2 /src
parent5629f7e62114e8da941dc08e2deae4afd92129dc (diff)
downloadrust-7c53eb97df4dc39c88e452d67b4f51d5bca336f6.tar.gz
rust-7c53eb97df4dc39c88e452d67b4f51d5bca336f6.zip
Add librustc metadata error codes to global check
Diffstat (limited to 'src')
-rw-r--r--src/librustc_driver/lib.rs1
-rw-r--r--src/librustc_metadata/diagnostics.rs6
-rw-r--r--src/librustc_metadata/lib.rs2
3 files changed, 6 insertions, 3 deletions
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs
index 4e87c931cc1..40106966630 100644
--- a/src/librustc_driver/lib.rs
+++ b/src/librustc_driver/lib.rs
@@ -1134,6 +1134,7 @@ pub fn diagnostics_registry() -> errors::registry::Registry {
     all_errors.extend_from_slice(&rustc_privacy::DIAGNOSTICS);
     all_errors.extend_from_slice(&rustc_trans::DIAGNOSTICS);
     all_errors.extend_from_slice(&rustc_const_eval::DIAGNOSTICS);
+    all_errors.extend_from_slice(&rustc_metadata::DIAGNOSTICS);
 
     Registry::new(&all_errors)
 }
diff --git a/src/librustc_metadata/diagnostics.rs b/src/librustc_metadata/diagnostics.rs
index 32189307466..01c7d7fc79d 100644
--- a/src/librustc_metadata/diagnostics.rs
+++ b/src/librustc_metadata/diagnostics.rs
@@ -21,7 +21,7 @@ A link name was given with an empty name. Erroneous code example:
 The rust compiler cannot link to an external library if you don't give it its
 name. Example:
 
-```
+```ignore
 #[link(name = "some_lib")] extern {} // ok!
 ```
 "##,
@@ -72,7 +72,7 @@ A link was used without a name parameter. Erroneous code example:
 Please add the name parameter to allow the rust compiler to find the library
 you want. Example:
 
-```
+```ignore
 #[link(kind = "dylib", name = "some_lib")] extern {} // ok!
 ```
 "##,
@@ -121,7 +121,7 @@ macro_rules! get_pimientos {
 
 // In your crate:
 #[macro_use(get_tacos, get_pimientos)] // It imports `get_tacos` and
-extern crate some_crate;               // `get_pimientos` macros from some_crate.
+extern crate some_crate;               // `get_pimientos` macros from some_crate
 ```
 
 If you would like to import all exported macros, write `macro_use` with no
diff --git a/src/librustc_metadata/lib.rs b/src/librustc_metadata/lib.rs
index a96fa8a006d..d27c0c03153 100644
--- a/src/librustc_metadata/lib.rs
+++ b/src/librustc_metadata/lib.rs
@@ -63,3 +63,5 @@ pub mod index;
 pub mod loader;
 pub mod macro_import;
 pub mod tls_context;
+
+__build_diagnostic_array! { librustc_metadata, DIAGNOSTICS }