Rollup merge of #66456 - Centril:driver-codes, r=Mark-Simulacrum

Move `DIAGNOSTICS` usage to `rustc_driver`

Remove `rustc_interface`'s dependency on `rustc_error_codes` and centralize all usages of `DIAGNOSTICS` in `rustc_driver`. Once we remove all references to `rustc_error_codes` in all other crates but `rustc_driver`, this should allow for incremental recompilation of the compiler to be smoother when tweaking error codes. This works towards https://github.com/rust-lang/rust/issues/66210#issuecomment-551862528.

(May include traces of minor drive-by cleanup.)

r? @Mark-Simulacrum
This commit is contained in:
Yuki Okushi
2019-11-17 13:36:18 +09:00
committed by GitHub
13 changed files with 40 additions and 53 deletions

View File

@@ -21,7 +21,6 @@ use syntax::feature_gate::UnstableFeatures;
use errors::json::JsonEmitter;
use syntax::symbol::sym;
use syntax_pos::DUMMY_SP;
use errors;
use errors::emitter::{Emitter, EmitterWriter};
use std::cell::RefCell;
@@ -341,6 +340,7 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
lint_caps,
register_lints: None,
override_queries: None,
registry: rustc_driver::diagnostics_registry(),
};
interface::run_compiler_in_existing_thread_pool(config, |compiler| {