about summary refs log tree commit diff
path: root/src/librustc_error_codes
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-01-20 11:14:48 +0530
committerGitHub <noreply@github.com>2020-01-20 11:14:48 +0530
commitfb86b820bbde7772477a95e36a70f06578313de2 (patch)
treeaecae88a60a7143ef11367d80b79465936182659 /src/librustc_error_codes
parent5d8edc99aabf5c69304b217daabf41b6bd813a41 (diff)
parentde6046fa0ff6e57afa50174c001d1668ee7f3cf6 (diff)
downloadrust-fb86b820bbde7772477a95e36a70f06578313de2.tar.gz
rust-fb86b820bbde7772477a95e36a70f06578313de2.zip
Rollup merge of #68353 - Centril:code-liberation, r=petrochenkov
Remove `rustc_error_codes` deps except in `rustc_driver`

Remove dependencies on `rustc_error_codes` in all crates except for `rustc_driver`.

This has some benefits:

1. Adding a new error code when hacking on the compiler only requires rebuilding at most `rustc_error_codes`, `rustc_driver`, and the reflexive & transitive closure of the crate where the new error code is being added and its reverse dependencies. This improves time-to-UI-tests (TTUT).

2. Adding an error description to an error code only requires rebuilding `rustc_error_codes` and `rustc_driver`. This should substantially improve TTUT.

r? @petrochenkov
cc @rust-lang/wg-diagnostics
Diffstat (limited to 'src/librustc_error_codes')
-rw-r--r--src/librustc_error_codes/lib.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/librustc_error_codes/lib.rs b/src/librustc_error_codes/lib.rs
index 14210fd69ad..f051fdd11b8 100644
--- a/src/librustc_error_codes/lib.rs
+++ b/src/librustc_error_codes/lib.rs
@@ -6,16 +6,8 @@ macro_rules! register_diagnostics {
         pub static DIAGNOSTICS: &[(&str, &str)] = &[
             $( (stringify!($ecode), $message), )*
         ];
-
-        $(
-            pub const $ecode: () = ();
-        )*
-        $(
-            pub const $code: () = ();
-        )*
     )
 }
 
 mod error_codes;
-
-pub use error_codes::*;
+pub use error_codes::DIAGNOSTICS;