From 67587fc740c1933ed83b658871d19a4f986759ec Mon Sep 17 00:00:00 2001 From: Jonathan Behrens Date: Sat, 7 Dec 2019 19:24:12 -0500 Subject: [PATCH] Features and dependencies can't have the same name The document was describing a Cargo.toml containing ``` [dependencies] postgres = { version = "*", optional = true } postgres-macros = { version = "*", optional = true } [features] postgres = ["postgres", "postgres-macros"] ``` If you tried doing this you'd get an error: ``` error: failed to parse manifest at `/home/jonathan/tmp/features/Cargo.toml` Caused by: Features and dependencies cannot have the same name: `postgres` ``` --- src/doc/src/reference/manifest.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/src/reference/manifest.md b/src/doc/src/reference/manifest.md index 9e2094770c1..d61eb4dd95c 100644 --- a/src/doc/src/reference/manifest.md +++ b/src/doc/src/reference/manifest.md @@ -405,7 +405,7 @@ Cargo supports features to allow expression of: * conditional compilation options (usable through `cfg` attributes); * optional dependencies, which enhance a package, but are not required; and -* clusters of optional dependencies, such as `postgres`, that would include the +* clusters of optional dependencies, such as `postgres-all`, that would include the `postgres` package, the `postgres-macros` package, and possibly other packages (such as development-time mocking libraries, debugging tools, etc.).