Rollup merge of #34610 - wuranbo:patch-2, r=steveklabnik
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:
commit
1b06c00ddd
|
@ -41,8 +41,9 @@ they get set in the [`[features]` section][features] of your `Cargo.toml`:
|
|||
# no features by default
|
||||
default = []
|
||||
|
||||
# The “secure-password” feature depends on the bcrypt package.
|
||||
secure-password = ["bcrypt"]
|
||||
# Add feature "foo" here, then you can use it.
|
||||
# Our "foo" feature depends on nothing else.
|
||||
foo = []
|
||||
```
|
||||
|
||||
When you do this, Cargo passes along a flag to `rustc`:
|
||||
|
|
Loading…
Reference in New Issue