Skip to content

Commit

Permalink
Rollup merge of rust-lang#34610 - wuranbo:patch-2, r=steveklabnik
Browse files Browse the repository at this point in the history
doc: make the conditional-compilation example work

If not, the error `does not have these features: foo` confused.
r? @steveklabnik
  • Loading branch information
Manishearth committed Jul 8, 2016
2 parents 8242a30 + d30662f commit 1b06c00
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/doc/book/conditional-compilation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:
Expand Down

0 comments on commit 1b06c00

Please sign in to comment.