doc: make the conditional-compilation example work
If not, the error `does not have these features: foo` confused. r? @steveklabnik
This commit is contained in:
parent
32a6373322
commit
dd8151f5e2
1 changed files with 5 additions and 1 deletions
|
|
@ -41,8 +41,12 @@ they get set in the [`[features]` section][features] of your `Cargo.toml`:
|
|||
# no features by default
|
||||
default = []
|
||||
|
||||
# Add feature "foo" here, then you can use it.
|
||||
# Our "foo" feature depends on nothings else.
|
||||
foo = []
|
||||
|
||||
# The “secure-password” feature depends on the bcrypt package.
|
||||
secure-password = ["bcrypt"]
|
||||
# secure-password = ["bcrypt"]
|
||||
```
|
||||
|
||||
When you do this, Cargo passes along a flag to `rustc`:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue