Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -1714,7 +1714,6 @@ impl<'a, 'tcx> Context<'a, 'tcx> {
}
}

Rvalue::ShallowInitBox(_, _) => todo!(),
Rvalue::CopyForDeref(_) => todo!(),
Rvalue::ThreadLocalRef(_) => todo!(),
_ => todo!(),
Expand Down
10 changes: 0 additions & 10 deletions kani-compiler/src/codegen_cprover_gotoc/codegen/rvalue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -824,16 +824,6 @@ impl GotocCtx<'_, '_> {
Rvalue::CheckedBinaryOp(op, e1, e2) => {
self.codegen_rvalue_checked_binary_op(op, e1, e2, res_ty)
}
Rvalue::ShallowInitBox(operand, content_ty) => {
// The behaviour of ShallowInitBox is simply transmuting *mut u8 to Box<T>.
// See https://github.com/rust-lang/compiler-team/issues/460 for more details.
let operand = self.codegen_operand_stable(operand);
let box_ty = Ty::new_box(*content_ty);
let box_ty = self.codegen_ty_stable(box_ty);
let cbmc_t = self.codegen_ty_stable(*content_ty);
let box_contents = operand.cast_to(cbmc_t.to_pointer());
self.box_value(box_contents, box_ty)
}
Rvalue::UnaryOp(op, e) => match op {
UnOp::Not => {
if self.operand_ty_stable(e).kind().is_bool() {
Expand Down
1 change: 0 additions & 1 deletion kani-compiler/src/kani_middle/analysis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ impl From<&Rvalue> for Key {
Rvalue::UnaryOp(_, _) => Key("UnaryOp"),
Rvalue::Discriminant(_) => Key("Discriminant"),
Rvalue::Aggregate(_, _) => Key("Aggregate"),
Rvalue::ShallowInitBox(_, _) => Key("ShallowInitBox"),
Rvalue::CopyForDeref(_) => Key("CopyForDeref"),
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,6 @@ impl<'tcx> PointsToAnalysis<'_, 'tcx> {
// Using the operand unchanged requires determining where it could point, which
// `successors_for_operand` does.
Rvalue::Use(operand)
| Rvalue::ShallowInitBox(operand, _)
| Rvalue::Cast(_, operand, _)
| Rvalue::Repeat(operand, ..)
| Rvalue::WrapUnsafeBinder(operand, _) => self.successors_for_operand(state, operand),
Expand Down
1 change: 0 additions & 1 deletion kani-compiler/src/kani_middle/transform/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,6 @@ pub trait MutMirVisitor {
Rvalue::Repeat(op, _) => {
self.visit_operand(op);
}
Rvalue::ShallowInitBox(op, _) => self.visit_operand(op),
Rvalue::UnaryOp(_, op) | Rvalue::Use(op) => {
self.visit_operand(op);
}
Expand Down
4 changes: 0 additions & 4 deletions kani-compiler/src/kani_middle/transform/check_values.rs
Original file line number Diff line number Diff line change
Expand Up @@ -657,10 +657,6 @@ impl MirVisitor for CheckValueVisitor<'_, '_> {
| CastKind::IntToFloat
| CastKind::FnPtrToPtr => {}
},
Rvalue::ShallowInitBox(_, _) => {
// The contents of the box is considered uninitialized.
// This should already be covered by the Assign detection.
}
Rvalue::Aggregate(kind, operands) => match kind {
// If the aggregated structure has invalid value, this could generate invalid value.
// But only if the operands don't have the exact same restrictions.
Expand Down
4 changes: 0 additions & 4 deletions kani-compiler/src/kani_middle/transform/internal_mir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,6 @@ impl RustcInternalMir for Rvalue {
operand.internal_mir(tcx),
internal(tcx, ty_const),
),
Rvalue::ShallowInitBox(operand, ty) => rustc_middle::mir::Rvalue::ShallowInitBox(
operand.internal_mir(tcx),
internal(tcx, ty),
),
Rvalue::ThreadLocalRef(crate_item) => {
rustc_middle::mir::Rvalue::ThreadLocalRef(internal(tcx, crate_item.0))
}
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-2026-02-18"
channel = "nightly-2026-02-20"
components = ["llvm-tools", "rustc-dev", "rust-src", "rustfmt"]
1 change: 0 additions & 1 deletion tests/cargo-kani/vecdeque-cve/src/harness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#![feature(rustc_attrs)]
#![feature(core_intrinsics)]
#![feature(ptr_internals)]
#![feature(rustc_allow_const_fn_unstable)]
#![allow(internal_features)]

#[cfg(disable_debug_asserts)]
Expand Down
1 change: 0 additions & 1 deletion tests/cargo-kani/vecdeque-cve/src/raw_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ impl<T, A: Allocator> RawVec<T, A> {

/// Like `new`, but parameterized over the choice of allocator for
/// the returned `RawVec`.
#[rustc_allow_const_fn_unstable(const_fn)]
pub const fn new_in(alloc: A) -> Self {
// `cap: 0` means "unallocated". zero-sized types are ignored.
Self { ptr: Unique::dangling(), cap: 0, alloc }
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/unsupported-annotation/expected
Original file line number Diff line number Diff line change
@@ -1 +1 @@
error[E0433]: failed to resolve: could not find `test_annotation` in `kani`
error[E0433]: cannot find `test_annotation` in `kani`
Loading