Skip to content

Commit

Permalink
Drive home the point about feature names
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jul 9, 2017
1 parent c97f2fa commit 327ca8e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,9 @@ serde = { version = "1.0", optional = true }

When we depend on `x`, we can enable the optional Serde dependency with
`features = ["serde"]`. Similarly we can enable the optional standard library
dependency with `features = ["std"]`.
dependency with `features = ["std"]`. The implicit feature inferred by Cargo for
the optional dependency is called `serde`, not `use-serde` or `with-serde`, so
we like for explicit features to behave the same way.

As a related note, Cargo requires that features are additive so a feature named
negatively like `no-abc` is practically never correct.
Expand Down

0 comments on commit 327ca8e

Please sign in to comment.