Skip to content

Commit 05da9c2

Browse files
committed
Upgrade Rust toolchain to 2025-11-06
Relevant upstream PR: - rust-lang/rust#147645 (rustc_target: introduce Arch) Resolves: model-checking#4450
1 parent d8774ed commit 05da9c2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

kani-compiler/src/codegen_cprover_gotoc/compiler_interface.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ use rustc_session::Session;
4343
use rustc_session::config::{CrateType, OutputFilenames, OutputType};
4444
use rustc_session::output::out_filename;
4545
use rustc_span::{Symbol, sym};
46-
use rustc_target::spec::PanicStrategy;
46+
use rustc_target::spec::{Arch, PanicStrategy};
4747
use std::any::Any;
4848
use std::cmp::min;
4949
use std::collections::BTreeMap;
@@ -302,10 +302,10 @@ impl CodegenBackend for GotocCodegenBackend {
302302
fn target_config(&self, sess: &Session) -> TargetConfig {
303303
// This code is adapted from the cranelift backend:
304304
// https://github.com/rust-lang/rust/blob/a124fb3cb7291d75872934f411d81fe298379ace/compiler/rustc_codegen_cranelift/src/lib.rs#L184
305-
let target_features = if sess.target.arch == "x86_64" && sess.target.os != "none" {
305+
let target_features = if sess.target.arch == Arch::X86_64 && sess.target.os != "none" {
306306
// x86_64 mandates SSE2 support and rustc requires the x87 feature to be enabled
307307
vec![sym::sse, sym::sse2, Symbol::intern("x87")]
308-
} else if sess.target.arch == "aarch64" {
308+
} else if sess.target.arch == Arch::AArch64 {
309309
match &*sess.target.os {
310310
"none" => vec![],
311311
// On macOS the aes, sha2 and sha3 features are enabled by default and ring
@@ -801,8 +801,8 @@ fn new_machine_model(sess: &Session) -> MachineModel {
801801
// see /tools/sizeofs/main.cpp.
802802
// For reference, the definition in CBMC:
803803
//https://github.com/diffblue/cbmc/blob/develop/src/util/config.cpp
804-
match architecture.as_ref() {
805-
"x86_64" => {
804+
match architecture {
805+
Arch::X86_64 => {
806806
let bool_width = 8;
807807
let char_is_unsigned = false;
808808
let char_width = 8;
@@ -841,7 +841,7 @@ fn new_machine_model(sess: &Session) -> MachineModel {
841841
word_size: int_width,
842842
}
843843
}
844-
"aarch64" => {
844+
Arch::AArch64 => {
845845
let bool_width = 8;
846846
let char_is_unsigned = true;
847847
let char_width = 8;

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

0 commit comments

Comments
 (0)