diff options
| 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 |
| commit | 2ac2dc1cfa136df6367c18596704cf268f856dcc (patch) | |
| tree | ba1742d070d354c0e4719e7d6095f02ee86eb683 /src | |
| parent | 716c552632acb50a524e62284b9ca2446333a626 (diff) | |
| download | rust-2ac2dc1cfa136df6367c18596704cf268f856dcc.tar.gz rust-2ac2dc1cfa136df6367c18596704cf268f856dcc.zip | |
Provide more context for `rustc +nightly -Zunstable-options` on stable
Diffstat (limited to 'src')
| -rw-r--r-- | src/driver.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/driver.rs b/src/driver.rs index 3c5b6e12b96..f3cc94aeff0 100644 --- a/src/driver.rs +++ b/src/driver.rs @@ -16,6 +16,8 @@ extern crate rustc_session; extern crate rustc_span; use rustc_interface::interface; +use rustc_session::EarlyErrorHandler; +use rustc_session::config::ErrorOutputType; use rustc_session::parse::ParseSess; use rustc_span::symbol::Symbol; @@ -187,7 +189,9 @@ const BUG_REPORT_URL: &str = "https://github.com/rust-lang/rust-clippy/issues/ne #[allow(clippy::too_many_lines)] pub fn main() { - rustc_driver::init_rustc_env_logger(); + let handler = EarlyErrorHandler::new(ErrorOutputType::default()); + + rustc_driver::init_rustc_env_logger(&handler); rustc_driver::install_ice_hook(BUG_REPORT_URL, |handler| { // FIXME: this macro calls unwrap internally but is called in a panicking context! It's not |
