Skip to content

Commit

Permalink
Auto merge of #10605 - yoav-lavi:patch-1, r=ehuss
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
bors committed May 5, 2022
2 parents a2c71c5 + 3ac6795 commit 5b4b755
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/doc/src/reference/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -513,3 +513,9 @@ source and inspect it.

[`cargo vendor`]: ../commands/cargo-vendor.md
[cargo-clone-crate]: https://crates.io/crates/cargo-clone-crate

### Feature combinations

Because features are a form of conditional compilation, they require an exponential number of configurations and test cases to be 100% covered. By default, tests, docs, and other tooling such as [Clippy](https://github.com/rust-lang/rust-clippy) will only run with the default set of features.

We encourage you to consider your strategy and tooling in regards to different feature combinations - Every project will have different requirements in conjunction with time, resources, and the cost-benefit of covering specific scenarios. Common configurations may be with / without default features, specific combinations of features, or all combinations of features.

0 comments on commit 5b4b755

Please sign in to comment.