Skip to content

Commit

Permalink
Upgrade toolchain to nightly-2025-01-22 (#3843)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tautschnig authored Jan 22, 2025
1 parent 3138a96 commit 511953d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ impl<'tcx> PointsToAnalysis<'_, 'tcx> {
// The same story from BinOp applies here, too. Need to track those things.
self.successors_for_operand(state, operand)
}
Rvalue::NullaryOp(..) | Rvalue::Discriminant(..) => {
Rvalue::NullaryOp(..) | Rvalue::Discriminant(..) | Rvalue::Len(_) => {
// All of those should yield a constant.
HashSet::new()
}
Expand Down
1 change: 0 additions & 1 deletion kani-compiler/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#![feature(f128)]
#![feature(f16)]
#![feature(non_exhaustive_omitted_patterns_lint)]
#![feature(float_next_up_down)]
#![feature(try_blocks)]
extern crate rustc_abi;
extern crate rustc_ast;
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-2025-01-16"
channel = "nightly-2025-01-22"
components = ["llvm-tools", "rustc-dev", "rust-src", "rustfmt"]
7 changes: 5 additions & 2 deletions tests/expected/function-contract/valid_ptr.expected
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
Checking harness pre_condition::harness_invalid_ptr...
VERIFICATION:- SUCCESSFUL (encountered one or more panics as expected)
Failed Checks: assertion failed: unsafe { read_ptr(ptr) } == -20
Failed Checks: Kani does not support reasoning about pointer to unallocated memory
Failed Checks: dereference failure: pointer outside object bounds
VERIFICATION:- FAILED

Checking harness pre_condition::harness_stack_ptr...
VERIFICATION:- SUCCESSFUL

Checking harness pre_condition::harness_head_ptr...
VERIFICATION:- SUCCESSFUL

Complete - 3 successfully verified harnesses, 0 failures, 3 total
Complete - 2 successfully verified harnesses, 1 failures, 3 total
1 change: 0 additions & 1 deletion tests/expected/function-contract/valid_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ mod pre_condition {
}

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

0 comments on commit 511953d

Please sign in to comment.