Skip to content

Commit 5828a4f

Browse files
authored
Add caveat for covering features
This section explains the caveats and possible solutions for features, detailing the tooling needed to 100% cover such a project. The need for this PR is based on a conversation with @Eh2406. Moved this PR here based on @Eh2406's comment: rust-lang/reference#1195 (comment)
1 parent 7a3b56b commit 5828a4f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/doc/src/reference/features.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,3 +513,9 @@ source and inspect it.
513513

514514
[`cargo vendor`]: ../commands/cargo-vendor.md
515515
[cargo-clone-crate]: https://crates.io/crates/cargo-clone-crate
516+
517+
### Caveats
518+
519+
Features, which are a form of conditional compilation, require an exponential number of configurations and test cases to be 100% covered. By default, testing, linting, Miri, docs and others will only run on the default set of features.
520+
521+
There are certain tools like [cargo-hack](https://github.com/taiki-e/cargo-hack) and [cargo-all-features](https://github.com/frewsxcv/cargo-all-features) that allow you to test all combinations of features which can help reduce the amount of configuraton needed.

0 commit comments

Comments
 (0)