Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add some hints to the docs for
cfg()
targets #6990Add some hints to the docs for
cfg()
targets #6990Changes from 1 commit
03294f8
f2663ba
69f9adb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I'm a little confused by how this is worded. Instead of trying to explain why it works this way, I would just be direct and say
cfg(feature = "foo")
cannot be used in the[target]
table, with a link to the[features]
section. Similarlytest
,proc-macro
, anddebug-assertions
do not work either, though I'm not sure if it is worthwhile to list everything that does or does not work.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.
Not wanting to list all of the configuration options is the reason I tried to explain why it works this way. Between giving a mechanical explanation of why feature flags don't work, and pointing the user at
--print=cfg
, I figured those would allow the user to figure out which options work and which options don't.I stripped it out, though. Let me know if you can think of a better way to do this.