Skip to content

Commit 2ac2dc1

Browse files
committed
Provide more context for rustc +nightly -Zunstable-options on stable
1 parent 716c552 commit 2ac2dc1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/driver.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ extern crate rustc_session;
1616
extern crate rustc_span;
1717

1818
use rustc_interface::interface;
19+
use rustc_session::EarlyErrorHandler;
20+
use rustc_session::config::ErrorOutputType;
1921
use rustc_session::parse::ParseSess;
2022
use rustc_span::symbol::Symbol;
2123

@@ -187,7 +189,9 @@ const BUG_REPORT_URL: &str = "https://github.com/rust-lang/rust-clippy/issues/ne
187189

188190
#[allow(clippy::too_many_lines)]
189191
pub fn main() {
190-
rustc_driver::init_rustc_env_logger();
192+
let handler = EarlyErrorHandler::new(ErrorOutputType::default());
193+
194+
rustc_driver::init_rustc_env_logger(&handler);
191195

192196
rustc_driver::install_ice_hook(BUG_REPORT_URL, |handler| {
193197
// FIXME: this macro calls unwrap internally but is called in a panicking context! It's not

0 commit comments

Comments
 (0)