Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the rust toolchain to 2023-12-20 #2961

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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