Skip to content

Commit 5dc5e0b

Browse files
remi-delmas-3000Remi Delmas
andauthored
New section about linter configuraton checking in the doc. (rust-lang#3198)
Resolves rust-lang#3197 By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses. Co-authored-by: Remi Delmas <[email protected]>
1 parent 1ba6cb2 commit 5dc5e0b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/src/usage.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,16 @@ default-unwind = 1
6868

6969
The options here are the same as on the command line (`cargo kani --help`), and flags (that is, command line arguments that don't take a value) are enabled by setting them to `true`.
7070

71+
Starting with Rust 1.80 (or nightly-2024-05-05), every reachable #[cfg] will be automatically checked that they match the expected config names and values.
72+
To avoid warnings on `cfg(kani)`, we recommend adding the `check-cfg` lint config in your crate's `Cargo.toml` as follows:
73+
74+
```toml
75+
[lints.rust]
76+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(kani)'] }
77+
```
78+
79+
For more information please consult this [blog post](https://blog.rust-lang.org/2024/05/06/check-cfg.html).
80+
7181
## The build process
7282

7383
When Kani builds your code, it does two important things:

0 commit comments

Comments
 (0)