Skip to content

Commit 511953d

Browse files
authored
Upgrade toolchain to nightly-2025-01-22 (#3843)
Changes required due to - rust-lang/rust#135344: Less unsafe in `dangling`/`without_provenance` - rust-lang/rust#135661: Stabilize `float_next_up_down` - rust-lang/rust#135709: Temporarily bring back `Rvalue::Len` Resolves: #3840 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 3138a96 commit 511953d

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

kani-compiler/src/kani_middle/points_to/points_to_analysis.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ impl<'tcx> PointsToAnalysis<'_, 'tcx> {
575575
// The same story from BinOp applies here, too. Need to track those things.
576576
self.successors_for_operand(state, operand)
577577
}
578-
Rvalue::NullaryOp(..) | Rvalue::Discriminant(..) => {
578+
Rvalue::NullaryOp(..) | Rvalue::Discriminant(..) | Rvalue::Len(_) => {
579579
// All of those should yield a constant.
580580
HashSet::new()
581581
}

kani-compiler/src/main.rs

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#![feature(f128)]
1717
#![feature(f16)]
1818
#![feature(non_exhaustive_omitted_patterns_lint)]
19-
#![feature(float_next_up_down)]
2019
#![feature(try_blocks)]
2120
extern crate rustc_abi;
2221
extern crate rustc_ast;

rust-toolchain.toml

+1-1
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-01-16"
5+
channel = "nightly-2025-01-22"
66
components = ["llvm-tools", "rustc-dev", "rust-src", "rustfmt"]
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
Checking harness pre_condition::harness_invalid_ptr...
2-
VERIFICATION:- SUCCESSFUL (encountered one or more panics as expected)
2+
Failed Checks: assertion failed: unsafe { read_ptr(ptr) } == -20
3+
Failed Checks: Kani does not support reasoning about pointer to unallocated memory
4+
Failed Checks: dereference failure: pointer outside object bounds
5+
VERIFICATION:- FAILED
36

47
Checking harness pre_condition::harness_stack_ptr...
58
VERIFICATION:- SUCCESSFUL
69

710
Checking harness pre_condition::harness_head_ptr...
811
VERIFICATION:- SUCCESSFUL
912

10-
Complete - 3 successfully verified harnesses, 0 failures, 3 total
13+
Complete - 2 successfully verified harnesses, 1 failures, 3 total

tests/expected/function-contract/valid_ptr.rs

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ mod pre_condition {
2828
}
2929

3030
#[kani::proof_for_contract(read_ptr)]
31-
#[kani::should_panic]
3231
fn harness_invalid_ptr() {
3332
let ptr = std::ptr::NonNull::<i32>::dangling().as_ptr();
3433
assert_eq!(unsafe { read_ptr(ptr) }, -20);

0 commit comments

Comments
 (0)