Skip to content

Commit 7c53eb9

Browse files
Add librustc metadata error codes to global check
1 parent 5629f7e commit 7c53eb9

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/librustc_driver/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1134,6 +1134,7 @@ pub fn diagnostics_registry() -> errors::registry::Registry {
11341134
all_errors.extend_from_slice(&rustc_privacy::DIAGNOSTICS);
11351135
all_errors.extend_from_slice(&rustc_trans::DIAGNOSTICS);
11361136
all_errors.extend_from_slice(&rustc_const_eval::DIAGNOSTICS);
1137+
all_errors.extend_from_slice(&rustc_metadata::DIAGNOSTICS);
11371138

11381139
Registry::new(&all_errors)
11391140
}

src/librustc_metadata/diagnostics.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ A link name was given with an empty name. Erroneous code example:
2121
The rust compiler cannot link to an external library if you don't give it its
2222
name. Example:
2323
24-
```
24+
```ignore
2525
#[link(name = "some_lib")] extern {} // ok!
2626
```
2727
"##,
@@ -72,7 +72,7 @@ A link was used without a name parameter. Erroneous code example:
7272
Please add the name parameter to allow the rust compiler to find the library
7373
you want. Example:
7474
75-
```
75+
```ignore
7676
#[link(kind = "dylib", name = "some_lib")] extern {} // ok!
7777
```
7878
"##,
@@ -121,7 +121,7 @@ macro_rules! get_pimientos {
121121
122122
// In your crate:
123123
#[macro_use(get_tacos, get_pimientos)] // It imports `get_tacos` and
124-
extern crate some_crate; // `get_pimientos` macros from some_crate.
124+
extern crate some_crate; // `get_pimientos` macros from some_crate
125125
```
126126
127127
If you would like to import all exported macros, write `macro_use` with no

src/librustc_metadata/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,5 @@ pub mod index;
6363
pub mod loader;
6464
pub mod macro_import;
6565
pub mod tls_context;
66+
67+
__build_diagnostic_array! { librustc_metadata, DIAGNOSTICS }

0 commit comments

Comments
 (0)