Skip to content

Commit

Permalink
Add librustc metadata error codes to global check
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Sep 3, 2016
1 parent 5629f7e commit 7c53eb9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/librustc_driver/lib.rs
Expand Up @@ -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)
}
Expand Down
6 changes: 3 additions & 3 deletions src/librustc_metadata/diagnostics.rs
Expand Up @@ -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!
```
"##,
Expand Down Expand Up @@ -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!
```
"##,
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/librustc_metadata/lib.rs
Expand Up @@ -63,3 +63,5 @@ pub mod index;
pub mod loader;
pub mod macro_import;
pub mod tls_context;

__build_diagnostic_array! { librustc_metadata, DIAGNOSTICS }

0 comments on commit 7c53eb9

Please sign in to comment.