Skip to content

Commit

Permalink
Auto merge of #7682 - fintelia:patch-1, r=ehuss
Browse files Browse the repository at this point in the history
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`
```
  • Loading branch information
bors committed Dec 8, 2019
2 parents 1072b35 + 67587fc commit df80f80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/doc/src/reference/manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.).

Expand Down

0 comments on commit df80f80

Please sign in to comment.