Skip to content

Commit 23da0ce

Browse files
kiro-agenttautschnig
authored andcommitted
Upgrade Rust toolchain to 2025-11-21
Relevant upstream PR: - rust-lang/rust#148261 (rustc_public: Make Id types !Send / !Sync) Resolves: #4485
1 parent 56a4268 commit 23da0ce

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

kani-compiler/src/codegen_cprover_gotoc/codegen/typ.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ impl<'tcx, 'r> GotocCtx<'tcx, 'r> {
808808
let flds: Vec<_> =
809809
tys.iter().enumerate().map(|(i, t)| (GotocCtx::tuple_fld_name(i), *t)).collect();
810810
// tuple cannot have other initial offset
811-
self.codegen_struct_fields(flds, &layout.layout.0, Size::ZERO)
811+
self.codegen_struct_fields(flds, &layout.layout, Size::ZERO)
812812
}
813813

814814
/// A closure is a struct of all its environments. That is, a closure is
@@ -980,7 +980,7 @@ impl<'tcx, 'r> GotocCtx<'tcx, 'r> {
980980
}
981981
fields.extend(ctx.codegen_alignment_padding(
982982
offset,
983-
&type_and_layout.layout.0,
983+
&type_and_layout.layout,
984984
fields.len(),
985985
));
986986
fields
@@ -1175,7 +1175,7 @@ impl<'tcx, 'r> GotocCtx<'tcx, 'r> {
11751175
self.ensure_struct(self.ty_mangled_name(ty), self.ty_pretty_name(ty), |ctx, _| {
11761176
let variant = &def.variants().raw[0];
11771177
let layout = ctx.layout_of(ty);
1178-
ctx.codegen_variant_struct_fields(variant, subst, &layout.layout.0, Size::ZERO)
1178+
ctx.codegen_variant_struct_fields(variant, subst, &layout.layout, Size::ZERO)
11791179
})
11801180
}
11811181

@@ -1293,7 +1293,7 @@ impl<'tcx, 'r> GotocCtx<'tcx, 'r> {
12931293
Some(variant) => {
12941294
// a single enum is pretty much like a struct
12951295
let layout = gcx.layout_of(ty).layout;
1296-
gcx.codegen_variant_struct_fields(variant, subst, &layout.0, Size::ZERO)
1296+
gcx.codegen_variant_struct_fields(variant, subst, &layout, Size::ZERO)
12971297
}
12981298
}
12991299
})

kani-compiler/src/kani_queries/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ pub struct QueryDb {
2020
kani_functions: OnceCell<HashMap<KaniFunction, FnDef>>,
2121
}
2222

23+
// SAFETY: QueryDb is always used behind Arc<Mutex<>> which provides proper synchronization.
24+
// The FnDef type from rustc_public is not Send due to ThreadLocalIndex, but we ensure
25+
// it's only accessed within the appropriate rustc_public context and never actually sent
26+
// between threads.
27+
unsafe impl Send for QueryDb {}
28+
2329
impl QueryDb {
2430
pub fn new() -> Arc<Mutex<QueryDb>> {
2531
Arc::new(Mutex::new(QueryDb::default()))

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

0 commit comments

Comments
 (0)