about summary refs log tree commit diff
path: root/src/tools/error_index_generator
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com>2023-06-23 05:56:09 +0800
committer许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com>2023-06-27 23:23:33 +0800
commitcef812bd958d5037224aebe3721f3ffc9c80965e (patch)
tree19351f8407da440738b59892da7c9309b97bb82a /src/tools/error_index_generator
parentf42f19b6d3d785a74dbe57aa395b6c288437dd51 (diff)
Provide more context for `rustc +nightly -Zunstable-options` on stable
Diffstat (limited to 'src/tools/error_index_generator')
-rw-r--r--src/tools/error_index_generator/main.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tools/error_index_generator/main.rs b/src/tools/error_index_generator/main.rs
index f984275b164..62a58576da5 100644
--- a/src/tools/error_index_generator/main.rs
+++ b/src/tools/error_index_generator/main.rs
@@ -1,6 +1,7 @@
 #![feature(rustc_private)]
 
 extern crate rustc_driver;
+extern crate rustc_session;
 
 use std::env;
 use std::error::Error;
@@ -170,7 +171,9 @@ fn parse_args() -> (OutputFormat, PathBuf) {
 }
 
 fn main() {
-    rustc_driver::init_env_logger("RUST_LOG");
+    let handler =
+        rustc_session::EarlyErrorHandler::new(rustc_session::config::ErrorOutputType::default());
+    rustc_driver::init_env_logger(&handler, "RUST_LOG");
     let (format, dst) = parse_args();
     let result = main_with_result(format, &dst);
     if let Err(e) = result {