Skip to content

Commit 81d045b

Browse files
authored
Upgrade Rust toolchain to 2025-08-18 (#4304)
Relevant upstream PR: - rust-lang/rust#145304 (Revert "Partially outline code inside the panic! macro".) Resolves: #4301 By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.
1 parent 6eb311d commit 81d045b

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

kani-compiler/src/codegen_cprover_gotoc/overrides/hooks.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use crate::unwrap_or_return_codegen_unimplemented_stmt;
1616
use cbmc::goto_program::CIntType;
1717
use cbmc::goto_program::Symbol as GotoSymbol;
1818
use cbmc::goto_program::{BuiltinFn, Expr, Location, Stmt, Type};
19+
use rustc_hir::LangItem;
1920
use rustc_middle::ty::TyCtxt;
2021
use rustc_public::mir::mono::Instance;
2122
use rustc_public::mir::{BasicBlockIdx, Place};
@@ -332,7 +333,7 @@ impl GotocHook for Panic {
332333
// panic functions we've stubbed too
333334
kani_tool_attr.is_some_and(|kani| kani.contains("PanicStub"))
334335
|| Some(def_id) == tcx.lang_items().panic_fn()
335-
|| tcx.has_attr(def_id, rustc_span::sym::rustc_const_panic_str)
336+
|| tcx.is_lang_item(def_id, LangItem::PanicDisplay)
336337
|| Some(def_id) == tcx.lang_items().panic_fmt()
337338
|| Some(def_id) == tcx.lang_items().begin_panic_fn()
338339
}

kani-compiler/src/kani_middle/transform/rustc_intrinsics.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use crate::kani_middle::transform::body::{
1313
};
1414
use crate::kani_middle::transform::{TransformPass, TransformationType};
1515
use crate::kani_queries::QueryDb;
16+
use rustc_hir::LangItem;
1617
use rustc_middle::ty::TyCtxt;
1718
use rustc_public::mir::mono::Instance;
1819
use rustc_public::mir::{
@@ -65,7 +66,7 @@ impl TransformPass for RustcIntrinsicsPass {
6566
fn is_panic_function(tcx: &TyCtxt, def_id: rustc_public::DefId) -> bool {
6667
let def_id = rustc_internal::internal(*tcx, def_id);
6768
Some(def_id) == tcx.lang_items().panic_fn()
68-
|| tcx.has_attr(def_id, rustc_span::sym::rustc_const_panic_str)
69+
|| tcx.is_lang_item(def_id, LangItem::PanicDisplay)
6970
|| Some(def_id) == tcx.lang_items().panic_fmt()
7071
|| Some(def_id) == tcx.lang_items().begin_panic_fn()
7172
}

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-2025-08-16"
5+
channel = "nightly-2025-08-18"
66
components = ["llvm-tools", "rustc-dev", "rust-src", "rustfmt"]

0 commit comments

Comments
 (0)