Skip to content

Commit 217f45a

Browse files
docs: fix typos (rust-lang#1268)
* docs: fix typos * docs: revert UB repetition because it's used in different contexts Co-authored-by: Adrian Palacios <[email protected]>
1 parent 528b115 commit 217f45a

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

docs/src/cheat-sheets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Command cheat sheets
22

33
Development work in the Kani project depends on multiple tools. Regardless of
4-
your familiriaty with the project, the commands below may be useful for
4+
your familiarity with the project, the commands below may be useful for
55
development purposes.
66

77
## Kani

docs/src/rust-feature-support/unstable.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
In general, unstable Rust features are out of scope and any support
44
for them available in Kani should be considered unstable as well.
55

6-
The following are exampels of unstable features that are not supported
6+
The following are examples of unstable features that are not supported
77
in Kani:
88
* Generators
99
* C-variadics

docs/src/tutorial/arbitrary-variables/src/inventory.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ mod verification {
5454
let quantity: NonZeroU32 = unsafe { kani::any_raw() };
5555

5656
// The assert bellow would fail if we comment it out.
57-
// assert!(id.get() != 0, "NonZeroU32 is internally a u32 but it should never be 0.");
57+
// assert!(quantity.get() != 0, "NonZeroU32 is internally a u32 but it should never be 0.");
5858

5959
// Update the inventory and check the result.
6060
inventory.update(id.clone(), quantity);

docs/src/undefined-behaviour.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ Rust’s [definition of UB](https://doc.rust-lang.org/reference/behavior-conside
2020
2121

2222
Given the lack of a formal semantics for UB, and given Kani's focus on memory safety, there are classes of UB which Kani does not detect.
23-
A non-exhaustive list of these, based on the the non-exhaustive list from the [Rust documentation](https://doc.rust-lang.org/reference/behavior-considered-undefined.html), is:
23+
A non-exhaustive list of these, based on the non-exhaustive list from the [Rust documentation](https://doc.rust-lang.org/reference/behavior-considered-undefined.html), is:
2424

2525
* Data races.
2626
* Kani focuses on sequential code.
2727
* Breaking the pointer aliasing rules (http://llvm.org/docs/LangRef.html#pointer-aliasing-rules).
28-
* Kani can detect if misuse of pointers causes memory safety or assertion violations, but does not not track reference lifetimes.
28+
* Kani can detect if misuse of pointers causes memory safety or assertion violations, but does not track reference lifetimes.
2929
* Mutating immutable data.
30-
* Kani can detect if modification of immutable data causes memory safety or assertion violations, but does not not track reference lifetimes.
30+
* Kani can detect if modification of immutable data causes memory safety or assertion violations, but does not track reference lifetimes.
3131
* Invoking undefined behavior via compiler intrinsics.
3232
* Kani makes a best effort attempt to check the preconditions of compiler intrinsics, but does not guarantee to do so in all cases.
3333
* Executing code compiled with platform features that the current platform does not support (see [target_feature](https://doc.rust-lang.org/reference/attributes/codegen.html#the-target_feature-attribute)).
@@ -44,6 +44,5 @@ Kani makes a best-effort attempt to detect some cases of UB:
4444
* Kani can detect invalid dereferences, but may not detect them in [place expression context](https://doc.rust-lang.org/reference/expressions.html#place-expressions-and-value-expressions).
4545
* Invoking undefined behavior via compiler intrinsics.
4646
* See [current support for compiler intrinsics](./rust-feature-support/intrinsics.md).
47-
* Producing an invalid value, even in private fields and locals.
47+
* Producing an invalid value, even in private fields and locals.
4848
* Kani provides a [mechanism](./tutorial-nondeterministic-variables.md#safe-nondeterministic-variables-for-custom-types) `is_valid()` which users can use to check validity of objects, but it does not currently apply to all types.
49-

0 commit comments

Comments
 (0)