Skip to content

Commit 1b06c00

Browse files
committed
Rollup merge of rust-lang#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
2 parents 8242a30 + d30662f commit 1b06c00

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/doc/book/conditional-compilation.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ they get set in the [`[features]` section][features] of your `Cargo.toml`:
4141
# no features by default
4242
default = []
4343

44-
# The “secure-password” feature depends on the bcrypt package.
45-
secure-password = ["bcrypt"]
44+
# Add feature "foo" here, then you can use it.
45+
# Our "foo" feature depends on nothing else.
46+
foo = []
4647
```
4748

4849
When you do this, Cargo passes along a flag to `rustc`:

0 commit comments

Comments
 (0)