Skip to content

Commit d5c144b

Browse files
author
Carolyn Zech
authored
Remove remaining --enable-unstable mentions (#3978)
#3859 deprecated `--enable-unstable`. This PR replaces the remaining references to `--enable-unstable` with `-Z unstable-options`. Towards #3068 Resolves #3908 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 bfa2a98 commit d5c144b

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

.github/workflows/verify-std-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
continue-on-error: true
6060
run: |
6161
kani verify-std -Z unstable-options ./library --target-dir ${{ runner.temp }} -Z function-contracts \
62-
-Z mem-predicates -Z loop-contracts --enable-unstable --cbmc-args --object-bits 12
62+
-Z mem-predicates -Z loop-contracts --cbmc-args --object-bits 12
6363
6464
# If the head failed, check if it's a new failure.
6565
- name: Checkout BASE
@@ -89,7 +89,7 @@ jobs:
8989
continue-on-error: true
9090
run: |
9191
kani verify-std -Z unstable-options ./library --target-dir ${{ runner.temp }} -Z function-contracts \
92-
-Z mem-predicates -Z loop-contracts --enable-unstable --cbmc-args --object-bits 12
92+
-Z mem-predicates -Z loop-contracts --cbmc-args --object-bits 12
9393
9494
- name: Compare PR results
9595
if: steps.check-head.outcome != 'success' && steps.check-head.outcome != steps.check-base.outcome

docs/src/reference/experimental/stubbing.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ Although definitions for *mocking* (normally used in testing) and *stubbing* may
1616

1717
## Components
1818

19-
The stubbing feature can be enabled by using the `--enable-stubbing` option when calling Kani.
20-
Since it's an unstable feature, it requires passing the `--enable-unstable` option in addition to `--enable-stubbing`.
19+
The stubbing feature can be enabled by using the `-Z stubbing` option when calling Kani (the `-Z` indicates that it's an unstable feature).
2120

2221
At present, the only component of the stubbing feature is [the `#[kani::stub(<original>, <replacement>)]` attribute](#the-kanistub-attribute),
2322
which allows you to specify the pair of functions/methods that must be stubbed in a harness.
@@ -60,6 +59,8 @@ At present, Kani fails to verify this example due to [issue #1781](https://githu
6059
However, we can work around this limitation thanks to the stubbing feature:
6160

6261
```rust
62+
use rand::random;
63+
6364
#[cfg(kani)]
6465
fn mock_random<T: kani::Arbitrary>() -> T {
6566
kani::any()
@@ -83,7 +84,8 @@ Note that this is a fair assumption to do: `rand::random` is expected to return
8384
Now, let's run it through Kani:
8485

8586
```bash
86-
cargo kani --enable-unstable --enable-stubbing --harness encrypt_then_decrypt_is_identity
87+
cargo add rand
88+
cargo kani -Z stubbing --harness encrypt_then_decrypt_is_identity
8789
```
8890

8991
The verification result is composed of a single check: the assertion corresponding to `assert_eq!(data, decrypted_data)`.

docs/src/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This works like `cargo test` except that it will analyze all proof harnesses ins
2323

2424
Common to both `kani` and `cargo kani` are many command-line flags:
2525

26-
* `--concrete-playback=[print|inplace]`: _Experimental_, `--enable-unstable` feature that generates a Rust unit test case
26+
* `--concrete-playback=[print|inplace]`: _Experimental_ feature that generates a Rust unit test case
2727
that plays back a failing proof harness using a concrete counterexample.
2828
If used with `print`, Kani will only print the unit test to stdout.
2929
If used with `inplace`, Kani will automatically add the unit test to the user's source code, next to the proof harness. For more detailed instructions, see the [concrete playback](./experimental/concrete-playback.md) section.

tests/script-based-pre/check-output/check-output.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ cd $(dirname $0)
3131

3232
echo "Running single-file check..."
3333
rm -rf *.c
34-
kani --gen-c --enable-unstable singlefile.rs >& kani.log || \
34+
kani --gen-c -Z unstable-options singlefile.rs >& kani.log || \
3535
{ ret=$?; echo "== Failed to run Kani"; cat kani.log; rm kani.log; exit 1; }
3636
rm -f kani.log
3737
if ! [ -e singlefile_*main.c ]
@@ -70,7 +70,7 @@ echo
7070
(cd multifile
7171
echo "Running multi-file check..."
7272
rm -rf build
73-
cargo kani --target-dir build --gen-c --enable-unstable >& kani.log || \
73+
cargo kani --target-dir build --gen-c -Z unstable-options >& kani.log || \
7474
{ ret=$?; echo "== Failed to run Kani"; cat kani.log; rm kani.log; exit 1; }
7575
rm -f kani.log
7676
cd build/kani/${TARGET}/debug/deps/

tests/ui/cbmc_checks/float-overflow/check_message.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright Kani Contributors
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
33
//
4-
// kani-flags: --enable-unstable --cbmc-args --float-overflow-check
4+
// kani-flags: -Z unstable-options --cbmc-args --float-overflow-check
55
// Check we don't print temporary variables as part of CBMC messages.
66
extern crate kani;
77

0 commit comments

Comments
 (0)