Skip to content

Commit

Permalink
Update the rust toolchain to 2023-12-20 (#2961)
Browse files Browse the repository at this point in the history
Fixes needed due to renaming of a few items:
 - rust-lang/rust#119063
  • Loading branch information
celinval committed Dec 20, 2023
1 parent 6b2b5cf commit c28dc5a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions kani-compiler/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use rustc_errors::{
ColorConfig, Diagnostic, TerminalUrl,
};
use rustc_session::config::ErrorOutputType;
use rustc_session::EarlyErrorHandler;
use rustc_session::EarlyDiagCtxt;
use std::io::IsTerminal;
use std::panic;
use std::sync::LazyLock;
Expand Down Expand Up @@ -71,7 +71,7 @@ pub fn init_session(args: &Arguments, 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.
let handler = EarlyErrorHandler::new(ErrorOutputType::default());
let handler = EarlyDiagCtxt::new(ErrorOutputType::default());
rustc_driver::init_rustc_env_logger(&handler);

// Install Kani panic hook.
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# SPDX-License-Identifier: Apache-2.0 OR MIT

[toolchain]
channel = "nightly-2023-12-18"
channel = "nightly-2023-12-20"
components = ["llvm-tools-preview", "rustc-dev", "rust-src", "rustfmt"]
8 changes: 4 additions & 4 deletions tools/bookrunner/librustdoc/doctest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pub fn make_test(
let result = rustc_driver::catch_fatal_errors(|| {
rustc_span::create_session_if_not_set_then(edition, |_| {
use rustc_errors::emitter::{Emitter, EmitterWriter};
use rustc_errors::Handler;
use rustc_errors::DiagCtxt;
use rustc_parse::maybe_new_parser_from_source_str;
use rustc_parse::parser::ForceCollect;
use rustc_session::parse::ParseSess;
Expand All @@ -88,8 +88,8 @@ pub fn make_test(
let emitter = EmitterWriter::new(Box::new(io::sink()), fallback_bundle);

// FIXME(misdreavus): pass `-Z treat-err-as-bug` to the doctest parser
let handler = Handler::with_emitter(Box::new(emitter));
let sess = ParseSess::with_span_handler(handler, sm);
let handler = DiagCtxt::with_emitter(Box::new(emitter));
let sess = ParseSess::with_dcx(handler, sm);

let mut found_main = false;
let mut found_extern_crate = crate_name.is_none();
Expand Down Expand Up @@ -152,7 +152,7 @@ pub fn make_test(
// handler. Any errors in the tests will be reported when the test file is compiled,
// Note that we still need to cancel the errors above otherwise `DiagnosticBuilder`
// will panic on drop.
sess.span_diagnostic.reset_err_count();
sess.dcx.reset_err_count();

(found_main, found_extern_crate, found_macro)
})
Expand Down

0 comments on commit c28dc5a

Please sign in to comment.