diff --git a/kani-compiler/src/kani_compiler.rs b/kani-compiler/src/kani_compiler.rs index cdb17b8cd0ac..2a5e4c188578 100644 --- a/kani-compiler/src/kani_compiler.rs +++ b/kani-compiler/src/kani_compiler.rs @@ -33,6 +33,7 @@ use rustc_hir::definitions::DefPathHash; use rustc_interface::Config; use rustc_middle::ty::TyCtxt; use rustc_session::config::{ErrorOutputType, OutputType}; +use rustc_session::EarlyErrorHandler; use rustc_span::ErrorGuaranteed; use std::collections::{BTreeMap, HashMap}; use std::fs::File; @@ -370,6 +371,7 @@ impl Callbacks for KaniCompiler { /// During the initialization state, we collect the crate harnesses and prepare for codegen. fn after_analysis<'tcx>( &mut self, + _handler: &EarlyErrorHandler, _compiler: &rustc_interface::interface::Compiler, rustc_queries: &'tcx rustc_interface::Queries<'tcx>, ) -> Compilation { diff --git a/kani-compiler/src/session.rs b/kani-compiler/src/session.rs index 6061554200dc..c19501c4a62e 100644 --- a/kani-compiler/src/session.rs +++ b/kani-compiler/src/session.rs @@ -9,6 +9,8 @@ use rustc_errors::{ emitter::Emitter, emitter::HumanReadableErrorType, fallback_fluent_bundle, json::JsonEmitter, ColorConfig, Diagnostic, TerminalUrl, }; +use rustc_session::config::ErrorOutputType; +use rustc_session::EarlyErrorHandler; use std::io::IsTerminal; use std::panic; use std::str::FromStr; @@ -71,7 +73,8 @@ pub fn init_session(args: &ArgMatches, json_hook: bool) { // Initialize the rustc logger using value from RUSTC_LOG. We keep the log control separate // because we cannot control the RUSTC log format unless if we match the exact tracing // version used by RUSTC. - rustc_driver::init_rustc_env_logger(); + let handler = EarlyErrorHandler::new(ErrorOutputType::default()); + rustc_driver::init_rustc_env_logger(&handler); // Install Kani panic hook. if json_hook { diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 98b700fbda14..f672b2397f5a 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -2,5 +2,5 @@ # SPDX-License-Identifier: Apache-2.0 OR MIT [toolchain] -channel = "nightly-2023-06-25" +channel = "nightly-2023-07-01" components = ["llvm-tools-preview", "rustc-dev", "rust-src", "rustfmt"]