Skip to content

Commit c28dc5a

Browse files
authored
Update the rust toolchain to 2023-12-20 (rust-lang#2961)
Fixes needed due to renaming of a few items: - rust-lang#119063
1 parent 6b2b5cf commit c28dc5a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

kani-compiler/src/session.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use rustc_errors::{
99
ColorConfig, Diagnostic, TerminalUrl,
1010
};
1111
use rustc_session::config::ErrorOutputType;
12-
use rustc_session::EarlyErrorHandler;
12+
use rustc_session::EarlyDiagCtxt;
1313
use std::io::IsTerminal;
1414
use std::panic;
1515
use std::sync::LazyLock;
@@ -71,7 +71,7 @@ pub fn init_session(args: &Arguments, json_hook: bool) {
7171
// Initialize the rustc logger using value from RUSTC_LOG. We keep the log control separate
7272
// because we cannot control the RUSTC log format unless if we match the exact tracing
7373
// version used by RUSTC.
74-
let handler = EarlyErrorHandler::new(ErrorOutputType::default());
74+
let handler = EarlyDiagCtxt::new(ErrorOutputType::default());
7575
rustc_driver::init_rustc_env_logger(&handler);
7676

7777
// Install Kani panic hook.

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# SPDX-License-Identifier: Apache-2.0 OR MIT
33

44
[toolchain]
5-
channel = "nightly-2023-12-18"
5+
channel = "nightly-2023-12-20"
66
components = ["llvm-tools-preview", "rustc-dev", "rust-src", "rustfmt"]

tools/bookrunner/librustdoc/doctest.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ pub fn make_test(
6666
let result = rustc_driver::catch_fatal_errors(|| {
6767
rustc_span::create_session_if_not_set_then(edition, |_| {
6868
use rustc_errors::emitter::{Emitter, EmitterWriter};
69-
use rustc_errors::Handler;
69+
use rustc_errors::DiagCtxt;
7070
use rustc_parse::maybe_new_parser_from_source_str;
7171
use rustc_parse::parser::ForceCollect;
7272
use rustc_session::parse::ParseSess;
@@ -88,8 +88,8 @@ pub fn make_test(
8888
let emitter = EmitterWriter::new(Box::new(io::sink()), fallback_bundle);
8989

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

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

157157
(found_main, found_extern_crate, found_macro)
158158
})

0 commit comments

Comments
 (0)