about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author吴冉波 <wuranbo@gmail.com>2016-07-02 15:19:09 +0800
committerGitHub <noreply@github.com>2016-07-02 15:19:09 +0800
commitdd8151f5e2bd12964f6ed99c8a0d91e7e6c3d3a2 (patch)
treebaaa5dd232e8cf780118e59f106e1bea9815259d /src
parent32a6373322d381c5778daea39a4f3b7ff94d9ee0 (diff)
downloadrust-dd8151f5e2bd12964f6ed99c8a0d91e7e6c3d3a2.tar.gz
rust-dd8151f5e2bd12964f6ed99c8a0d91e7e6c3d3a2.zip
doc: make the conditional-compilation example work
If not, the error `does not have these features: foo` confused. 
r? @steveklabnik
Diffstat (limited to 'src')
-rw-r--r--src/doc/book/conditional-compilation.md6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/doc/book/conditional-compilation.md b/src/doc/book/conditional-compilation.md
index a6ff75db89b..a175d7cc38b 100644
--- a/src/doc/book/conditional-compilation.md
+++ b/src/doc/book/conditional-compilation.md
@@ -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`: