Skip to content

Commit dd8151f

Browse files
authored
doc: make the conditional-compilation example work
If not, the error `does not have these features: foo` confused. r? @steveklabnik
1 parent 32a6373 commit dd8151f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/doc/book/conditional-compilation.md

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

44+
# Add feature "foo" here, then you can use it.
45+
# Our "foo" feature depends on nothings else.
46+
foo = []
47+
4448
# The “secure-password” feature depends on the bcrypt package.
45-
secure-password = ["bcrypt"]
49+
# secure-password = ["bcrypt"]
4650
```
4751

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

0 commit comments

Comments
 (0)