From 327ca8e7e0d4cdefc6cc18eee66dbe51c0e49c43 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 9 Jul 2017 11:56:59 -0700 Subject: [PATCH] Drive home the point about feature names --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 68c7bf8..987c3b4 100644 --- a/README.md +++ b/README.md @@ -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.