Skip to content

Commit d095367

Browse files
adpaco-awscelinval
andauthored
Update Rust toolchain to nightly-2023-12-08 (#2926)
Updates the Rust toolchain to `nightly-2023-12-08`. The relevant changes are: * rust-lang/rust#118324 * rust-lang/rust#118684 --------- Co-authored-by: Celina G. Val <[email protected]>
1 parent d26485a commit d095367

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,8 @@ impl<'tcx> GotocCtx<'tcx> {
421421
}
422422
(Scalar::Ptr(ptr, _size), _) => {
423423
let res_t = self.codegen_ty(ty);
424-
let (alloc_id, offset) = ptr.into_parts();
424+
let (prov, offset) = ptr.into_parts();
425+
let alloc_id = prov.alloc_id();
425426
self.codegen_alloc_pointer(res_t, alloc_id, offset, span)
426427
}
427428
_ => unimplemented!(),
@@ -646,7 +647,8 @@ impl<'tcx> GotocCtx<'tcx> {
646647
Size::from_bytes(self.symbol_table.machine_model().pointer_width_in_bytes());
647648

648649
let mut next_offset = Size::ZERO;
649-
for &(offset, alloc_id) in alloc.provenance().ptrs().iter() {
650+
for &(offset, prov) in alloc.provenance().ptrs().iter() {
651+
let alloc_id = prov.alloc_id();
650652
if offset > next_offset {
651653
let bytes = alloc.inspect_with_uninit_and_ptr_outside_interpreter(
652654
next_offset.bytes_usize()..offset.bytes_usize(),

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,11 @@ impl<'tcx> GotocCtx<'tcx> {
332332
ty: Ty<'tcx>,
333333
args: ty::GenericArgsRef<'tcx>,
334334
) -> ty::PolyFnSig<'tcx> {
335-
let sig = args.as_coroutine().poly_sig();
335+
let sig = args.as_coroutine().sig();
336336

337-
let bound_vars = self.tcx.mk_bound_variable_kinds_from_iter(
338-
sig.bound_vars().iter().chain(iter::once(ty::BoundVariableKind::Region(ty::BrEnv))),
339-
);
337+
let bound_vars = self.tcx.mk_bound_variable_kinds_from_iter(iter::once(
338+
ty::BoundVariableKind::Region(ty::BrEnv),
339+
));
340340
let br = ty::BoundRegion {
341341
var: ty::BoundVar::from_usize(bound_vars.len() - 1),
342342
kind: ty::BoundRegionKind::BrEnv,
@@ -349,7 +349,6 @@ impl<'tcx> GotocCtx<'tcx> {
349349
let pin_args = self.tcx.mk_args(&[env_ty.into()]);
350350
let env_ty = Ty::new_adt(self.tcx, pin_adt_ref, pin_args);
351351

352-
let sig = sig.skip_binder();
353352
// The `FnSig` and the `ret_ty` here is for a coroutines main
354353
// `coroutine::resume(...) -> CoroutineState` function in case we
355354
// have an ordinary coroutine, or the `Future::poll(...) -> Poll`

kani-compiler/src/kani_middle/reachability.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,7 @@ impl<'tcx> MonoItemsCollector<'tcx> {
153153
/// instruction looking for the items that should be included in the compilation.
154154
fn reachable_items(&mut self) {
155155
while let Some(to_visit) = self.queue.pop() {
156-
// TODO: This should only check is_foreign_item() or even `has_body()`.
157-
// We need https://github.com/rust-lang/rust/pull/118681 to land first.
158-
if !self.collected.contains(&to_visit)
159-
&& !self.tcx.is_foreign_item(rustc_internal::internal(to_visit.clone()).def_id())
160-
{
156+
if !self.collected.contains(&to_visit) {
161157
self.collected.insert(to_visit.clone());
162158
let next_items = match &to_visit {
163159
MonoItem::Fn(instance) => self.visit_fn(*instance),

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-07"
5+
channel = "nightly-2023-12-08"
66
components = ["llvm-tools-preview", "rustc-dev", "rust-src", "rustfmt"]

0 commit comments

Comments
 (0)