-
Notifications
You must be signed in to change notification settings - Fork 13.3k
doc: make the conditional-compilation example work #34610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this one being commented out? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When I run with this line: secure-password = ["bcrypt"] Caused by: So, tell me, how should I fix it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah so, as the comment says
If you don't have the package as a dependency, then it's going to give an error. Can we just remove these three lines? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh. thank you. I will remove these. |
||
``` | ||
|
||
When you do this, Cargo passes along a flag to `rustc`: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change this to "nothing" rather than "nothings" please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK~My english is poor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries! 😄 I'm a native speaker and mine is often terrible.