Skip to content

Commit 4e23761

Browse files
committed
Rename EarlyErrorHandler as EarlyDiagCtxt.
1 parent 4503a3d commit 4e23761

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/bin/miri.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use rustc_middle::{
3535
};
3636
use rustc_session::config::{CrateType, ErrorOutputType, OptLevel};
3737
use rustc_session::search_paths::PathKind;
38-
use rustc_session::{CtfeBacktrace, EarlyErrorHandler};
38+
use rustc_session::{CtfeBacktrace, EarlyDiagCtxt};
3939

4040
use miri::{BacktraceStyle, BorrowTrackerMethod, ProvenanceMode, RetagFields};
4141

@@ -69,7 +69,7 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
6969
tcx.sess.fatal("miri cannot be run on programs that fail compilation");
7070
}
7171

72-
let handler = EarlyErrorHandler::new(tcx.sess.opts.error_format);
72+
let handler = EarlyDiagCtxt::new(tcx.sess.opts.error_format);
7373
init_late_loggers(&handler, tcx);
7474
if !tcx.crate_types().contains(&CrateType::Executable) {
7575
tcx.sess.fatal("miri only makes sense on bin crates");
@@ -215,7 +215,7 @@ fn rustc_logger_config() -> rustc_log::LoggerConfig {
215215
cfg
216216
}
217217

218-
fn init_early_loggers(handler: &EarlyErrorHandler) {
218+
fn init_early_loggers(handler: &EarlyDiagCtxt) {
219219
// Note that our `extern crate log` is *not* the same as rustc's; as a result, we have to
220220
// initialize them both, and we always initialize `miri`'s first.
221221
let env = env_logger::Env::new().filter("MIRI_LOG").write_style("MIRI_LOG_STYLE");
@@ -228,7 +228,7 @@ fn init_early_loggers(handler: &EarlyErrorHandler) {
228228
}
229229
}
230230

231-
fn init_late_loggers(handler: &EarlyErrorHandler, tcx: TyCtxt<'_>) {
231+
fn init_late_loggers(handler: &EarlyDiagCtxt, tcx: TyCtxt<'_>) {
232232
// If `RUSTC_LOG` is not set, then `init_early_loggers` did not call
233233
// `rustc_driver::init_logger`, so we have to do this now.
234234
if env::var_os("RUSTC_LOG").is_none() {
@@ -300,7 +300,7 @@ fn parse_comma_list<T: FromStr>(input: &str) -> Result<Vec<T>, T::Err> {
300300
}
301301

302302
fn main() {
303-
let handler = EarlyErrorHandler::new(ErrorOutputType::default());
303+
let handler = EarlyDiagCtxt::new(ErrorOutputType::default());
304304

305305
// Snapshot a copy of the environment before `rustc` starts messing with it.
306306
// (`install_ice_hook` might change `RUST_BACKTRACE`.)

0 commit comments

Comments
 (0)